Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Freezes on Submission on SIm account

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Order Freezes on Submission on SIm account

    Ok. I have an issue where sometime nInja sends an order on sim that freezes the chart and data feed for that instrument. The order then stays in submitted mode and the only way to clear it is to reset the account. Where can I trace to see why it hung? Is this something to do with how I send the order. In this case the Entry to go short was set before the stoploss was set.
    Would that be the culprit?

    EnterShortLimit(0,true,1,ActiveSellPoint-3 *TickSize, "Nuero1") ;
    EnterShortLimit(0,true,1,ActiveSellPoint-3 * TickSize, "Nuero1Trail") ;
    SetStopLoss("Nuero1", CalculationMode.Price, Stoppp ,false);
    SetStopLoss("Nuero1Trail", CalculationMode.Price,Stoppp ,false);
    SetProfitTarget("Nuero1", CalculationMode.Ticks,(Stoppp-ActiveSellPoint) / TickSize );
    SetProfitTarget("Nuero1Trail", CalculationMode.Ticks,79);​




    Click image for larger version

Name:	image.png
Views:	110
Size:	8.4 KB
ID:	1247349

    #2
    Hello richa61416,

    Thanks for your post.

    First, if this is a live trade please contact your broker to manage the position.

    If the order was submitted to the Sim101 account please reset the Sim101 account.

    To reset the Sim101 account please go to Tools--> Options--> Simulator--> and click Reset

    Click here for more information on the Sim101 account: https://ninjatrader.com/support/help...01_account.htm

    If this was a live trade, once you have closed the position with your broker please repair your database to remove the order from NinjaTrader.

    To repair your database please go to Tools -> Options -> Data -> and click Repair DB.

    If this does not remove the order then the order will be removed when your broker resets their servers.​​

    That said, simulation account orders can become stuck for a number of reasons, such as a connection loss, database issue, or attempting to change an order while it is in the process of filling.

    Simulation orders are held locally on your PC. If this were to happen in a live account, since these orders are held server-side, there is much less of a chance that these orders would get stuck. In this rare case, yes you could call your broker's trade desk and have them modify or cancel your order manually.​

    I see that you are calling your Set methods after your Entry order methods. The Set methods in your script you should called before the Entry methods since Set methods prep NinjaTrader to submit those protective orders. For example:

    SetProfitTarget(CalculationMode.Ticks, 10);
    SetStopLoss(CalculationMode.Ticks, 10);

    EnterLong();

    From the help guide: Since they are submitted upon receiving an execution, the Set method should be called prior to submitting the associated entry order to ensure an initial level is set.

    SetProfitTarget(): https://ninjatrader.com/support/help...ofittarget.htm
    SetStopLoss(): https://ninjatrader.com/support/help...etstoploss.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X