Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy Trail error

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

    ATM Strategy Trail error

    Hi,

    I am using ATMStrategy.
    Sometimes, when the market is too volatile, the autotrail gives these errors.
    The trail is working fine and I understand the error.

    Is there a way to suppress or ignore these errors to avoid the multiple pop ups?


    #2
    Hello pvincent,

    Thanks for your post.

    Unfortunately, there are no supported means for preventing the error message from popping up on the screen. We are currently tracking interest in this feature in an internal ticket and I have added your vote.

    The internal tracking number for your feature request is SFT-671. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

    When a feature request is implemented, you'll find a description of the new feature in the release notes:That said, this error message means that the strategy attempted to change an order to the wrong side of the market. If this is due to market volatility then there isn't really a way to 100% avoid this occurring, as in volatile markets the market could move so far and fast that this would occur.

    Something you could consider is using GetCurrentBid() and GetCurrentAsk() to offset orders so that they are more likely to land on the correct side of the market.

    See these help guide pages for more information.
    GetCurrentBid(): https://ninjatrader.com/support/help...currentbid.htm
    GetCurrentAsk(): https://ninjatrader.com/support/help...currentask.htm

    You could also consider using RealtimeErrorHandling.IgnoreAllErrors to trap order errors in OnOrderUpdate by checking error == ErrorCode.UnableToChangeOrder.

    Please note that setting this property value to IgnoreAllErrors can have serious adverse affects on a running strategy unless you have programmed your own order rejection handling in the OnOrderUpdate() method. To do this you could trap the rejected order within OnOrderUpdate() followed by defining your own order rejection handling behavior for the rejected order.

    Please see the example in the help guide link below that demonstrates using RealtimeErrorHandling and trapping a rejected order in OnOrderUpdate().

    RealtimeErrorHandling — https://ninjatrader.com/es/support/h...orhandling.htm

    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
      Hi Brandon,

      The "ATMStrategy" trail, sometimes cancels the trail order and leaves the position with no stop/trail.
      Would you please let me know how to resolve this?

      I am using the "ATMstrategy" to submit the orders similar to what has specified here:


      Comment


        #4
        Hello pvincent,

        Thanks for your note.

        I understand that you are using Set methods, such as SetStopLoss/SetProfitTarget, similar to the reference sample you linked. Note that these are not Atm Strategy methods. See the help guide documentation below to see the difference between these methods.

        SetStopLoss(): https://ninjatrader.com/support/help...etstoploss.htm
        SetProfitTarget(): https://ninjatrader.com/support/help...ofittarget.htm
        Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm

        From my previous post:

        Something you could consider is using GetCurrentBid() and GetCurrentAsk() to offset orders so that they are more likely to land on the correct side of the market.

        See these help guide pages for more information.
        GetCurrentBid(): https://ninjatrader.com/support/help...currentbid.htm
        GetCurrentAsk(): https://ninjatrader.com/support/help...currentask.htm

        Or, you could use RealtimeErrorHandling to trap order errors and program your own order rejection handling.


        You could also consider using RealtimeErrorHandling.IgnoreAllErrors to trap order errors in OnOrderUpdate by checking error == ErrorCode.UnableToChangeOrder.

        Please note that setting this property value to IgnoreAllErrors can have serious adverse affects on a running strategy unless you have programmed your own order rejection handling in the OnOrderUpdate() method. To do this you could trap the rejected order within OnOrderUpdate() followed by defining your own order rejection handling behavior for the rejected order.

        Please see the example in the help guide link below that demonstrates using RealtimeErrorHandling and trapping a rejected order in OnOrderUpdate().

        RealtimeErrorHandling — https://ninjatrader.com/es/support/h...orhandling.htm


        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


          #5
          Sorry ,not that sample.

          Similar to this one:

          Comment


            #6
            Hello pvincent,

            Thanks for your note.

            When clicking the link you shared, I am being taken to the same reference sample, SamplePnL. Is this the reference sample you are referring to?

            Ultimately, you would need to either place your stop-loss orders farther away from your entry order or use RealtimeErrorHandling to trap order errors and program your own order rejection handling.

            You could consider using GetCurrentBid() and GetCurrentAsk() to offset orders so that they are more likely to land on the correct side of the market.

            See post #4 for more information about using GetCurrentBid() and GetCurrentAsk() and information about using RealtimeErrorHandling to trap order errors and program your own order rejection handling.

            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

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            66 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            141 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
            46 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            51 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X