Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy execution stops after moving the price

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

    Strategy execution stops after moving the price

    I have a strategy that has stops and targets. I move the stop or target, the strategy stops executing further. I have confirmed that the strategy is still enabled. There have been times when I clicked the 'Close' button and the strategy automatically disables. Would there be a way to prevent this?

    Thanks!

    #2
    Hello Graci117,

    Thank you for your post.

    Is this a strategy that you developed or one that was imported from a third party? Are you manually moving the stops and targets or do you mean that the strategy programmatically moves the stops and targets?

    If your NinjaScript strategy uses ATM strategies, please read the following page for more details including how to close only the ATM strategy position and not disable the entire strategy:


    I look forward to your reply.

    Comment


      #3
      Thanks Emily. It is a strategy that I developed. It does not use any atm strategy.

      Comment


        #4
        Hello Graci117,

        Thank you for your reply.

        Are you manually moving the stops and targets or do you mean that the strategy programmatically moves the stops and targets? Automated NinjaScript strategies are intended to be left to calculate on their own without user interaction. Manually modifying orders could result in unexpected behavior from the strategy. If you intend to have stops and targets that may be modified manually, then you should consider using an ATM strategy in your NinjaScript strategy logic. The link I shared previously is an overview of the line between NinjaScript strategies and ATM strategies:The ATM strategy methods may be found here:There is also an example strategy that comes with NinjaTrader called SampleAtmStrategy which is a helpful demonstration of how to incorporate an ATM strategy into your NinjaScript strategy's logic.

        Please let us know if we may be of further assistance.

        Comment


          #5
          Thanks again Emily. I am manually moving stops. If I use the ATM strategy then will I be able to test it on strategy analyzer?

          Comment


            #6
            Originally posted by Graci117 View Post
            Thanks again Emily. I am manually moving stops. If I use the ATM strategy then will I be able to test it on strategy analyzer?
            No, when using ATM strategies in NinjaScript they only work in real-time and you would not be able to backtest them in the Strategy Analyzer because it uses historical data. This is mentioned in the first bullet point of this page:


            If you want to test the strategy on past data, you could instead use the Playback Connection:


            Please feel free to reach out with any additional questions or concerns.

            Comment


              #7
              Originally posted by Duane95
              Thank you, Emily. This is a strategy I devised, and it doesn't rely on any ATM strategy.
              Hello Duane95,

              Thank you for your note.

              I do not understand the context of your reply. In this thread I was previously assisting Graci117. Are you experiencing some sort of unexpected behavior related to your strategy? If so, please explain what is happening vs. what you are expecting to happen so I may better understand and assist you.

              Thank you for using NinjaTrader.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              60 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