Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Disable & Enable Removes Exit Orders

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

    Strategy Disable & Enable Removes Exit Orders

    I have a strategy that enters a position with a stop loss and target order. If I disable and re-enable the strategy both exit orders get cancelled but the position remains opened. When I look at the log the New State is set to Cancelled. Prior to disabling the strategy the orders where in New state = Working. Can anyone shed some light as to what is happening here? Is that by design? Obviously I'd prefer both exit orders to remain in place. My settings below:

    Calculate = Calculate.OnBarClose;
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.AllEntries;
    IsExitOnSessionCloseStrategy = false;
    ExitOnSessionCloseSeconds = 30;
    IsFillLimitOnTouch = false;
    MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
    OrderFillResolution = OrderFillResolution.Standard;
    Slippage = 0;
    StartBehavior = StartBehavior.WaitUntilFlat;
    TimeInForce = TimeInForce.Gtc;
    TraceOrders = false;
    RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
    StopTargetHandling = StopTargetHandling.PerEntryExecution;
    BarsRequiredToTrade = 3;
    // Disable this property for performance gains in Strategy Analyzer optimizations
    // See the Help Guide for additional information
    IsInstantiatedOnEachOptimizationIteration = true;


    Last edited by bc24fl; 02-04-2021, 12:32 AM.

    #2
    Hello bc24fl,

    Thank you for your post.

    You could determine if exit orders cancel when a strategy is disabled by navigating to Control Center > Tools > Options > Strategies tab. Within the NinjaScript section of the Strategies tab, you may enable or disable automatic cancellation of exit orders. A checkmark displayed means the setting is enabled and orders will be canceled when disabling a strategy.

    See this help guide link for more information - https://ninjatrader.com/support/helpGuides/nt8/index.html?options_strategies.htm#Understandingnin jascriptProperties

    Please let us know if we may assist further.
    <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


      #3
      I have both unchecked. See image for options.
      Attached Files

      Comment


        #4
        Hello bc24fl,

        Thank you for that information.

        Please write into PlatformSupport[AT]ninjatrader.com with your Log and Trace files as well as an export of your strategy so we may further investigate. In the subject of the email, please use ATTN: Brandon, and in the body of the email provide a link to this forum post.

        Follow the steps below to manually attach your log and trace files to your response.
        • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
        • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        • Send the 2 compressed folders as attachments to this email.
        • Once complete, you can delete these compressed folders.
        Exporting - https://ninjatrader.com/support/help...tAsSourceFiles

        Thanks in advance, I look forward to further assisting.
        <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, 03-13-2026, 05:17 AM
        0 responses
        95 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        153 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        80 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        54 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        70 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X