Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy hits target, stop order remaining and atm still active

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

    ATM Strategy hits target, stop order remaining and atm still active

    Hello Support,

    I have my Strategy script call my Atm template. It is working, but when it hits target the stop is dangling, and I can see now three stop orders and three Atm are still active. There are three of them in the attached picture. I have no idea how to remove them too. When it hits stops, the target disappear and the Atm is removed. When price hits those stops, nothing happens.

    Please let me know how to remove those stops and active ATM. And also how to avoid this from happening again.

    Thanks.

    Best Regards,

    Mokaru Z.


    Attached Files

    #2
    Hello Support.

    My log screen capture is attached now showing 4 "Cancel Pending" status.

    Thanks.

    Best regards,

    Mokaru Z.
    Attached Files

    Comment


      #3
      Hello Support,

      I now have 5 Stops dangling. I did "cancel all orders", it has no effect.

      Thanks.

      Best Regards,
      Mokaru Z.
      Attached Files

      Comment


        #4
        Hello Mokaru Zen,

        Does the strategy have logic to prevent a new entry while a position is open?

        The SampleAtmStrategy demonstrates this. When the orderId and atmStrategyId have a value no new entry is allowed. The values for these are removed when atm strategy position is flat, on line 93.

        Use Print() to understand the behavior. Print all values in the condition set that submits the entry order. Include the time of the bar and include labels for all values.
        Below is a link to a forum post that demonstrates using Print() to understand behavior.


        The output can be saved to a text file by right-clicking the output window and selecting Save as.

        I am happy to assist with analyzing the output from prints.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          My strategy file is based on the SampleAtmStrategy but the logic is in my custom indicator, which will issue signal at the close of bar. The Atm first target is typically smaller than the next bar, the second target will not be hit within the close of next bar, when a new signal may be issued.

          How can I keep 2 trades per signal and avoid the issue? I mean I would like to enter another 2 trades, while the second target has not been hit. What is the easiest way to resolve the issue?

          I can actually release my strategy file, I did minimal changes from the sample.

          Thank you.

          Best regards,
          Mokaru Z.


          Attached Files

          Comment


            #6
            Hello Mokaru Z,

            If you plan to have two active Atm Strategies, you will need two sets of variables to track the Order Ids and Strategy Ids for these separately. You will need the logic to check each of the ids, separately.

            If you want to submit a new entry after the first atm is active, you can check the position of the first atm by supplying the Strategy Id of that atm to GetAtmStrategyMarketPosition().

            You can use Print() to understand which conditions are evaluating as true and when.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea,

              Thank you for the explanation. I will implement it some other day.

              Can you tell me how to remove those 5 dangling orders? that will not do anything (will not get filled even when price touch them) and yet remaining on the chart as attached.
              I have tried cancel all orders, no effect.

              Thanks.

              Best Regards,

              Mokaru Z.





              Comment


                #8
                Hello Mokaru,

                If these are Sim101 orders, reset the Sim101.


                If these are live orders, disconnect from all connections and re-connect.

                Are you able to reproduce this behavior when placing manual orders with Atm strategies attached?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hello Chelsea,

                  I have reset my Sim101 account, all is well.

                  I am able to do manual entry with the ATM, and select inactive template for second entry and all works.

                  Each corresponding stop is cleared when target is hit.

                  Thank you.

                  Best Regards,

                  Mokaru Z.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  65 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  139 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