Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

B13 Strategy Window Yellow in tick replay mode

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

    B13 Strategy Window Yellow in tick replay mode

    I am currently trying to test a strategy in tick replay mode. I loaded the strategy in the strategy tabs window, and set the start of replay from 12:00 AM today. When I enable the strategy, it turns green and is ready. However while replay is paused and I scroll to a time around lunch I wanted to test out, the strategy name becomes yellow. The log window says

    -Stop/target handling for strategy "myscalp" set to "bystrategyposition" since currency based stop order was placed.

    This makes no sense as no trades were taken before any of this. I have tried reseting the DB and even repairing it and restarting ninja and I always get the same error.

    Not sure if I am doing something wrong or this is a legit bug.

    I added a print line to OnBarUpdate with Position.MarketPosition. And to my surprise checking the output window, it shows that I am in a position, even though I have not started tick replay, except for scrolling to the appropriate time in day where I wanted to start.

    -Alex

    #2
    I got it working with a slight modification, where it takes no trades before the time that I want to start it at. What this leads me to believe is that when you scroll time in the replay box, it resets the replay101 account and reenables the strategy script but does not reset your trade storage array in your NT code.

    An easy way to duplicate this is creating a simple strategy of entering a long when Close > Open, that way we ensure that not to wait much for a trigger and set no stops or targets. If I enable this strategy script within tick replay, it will also be yellow every time I scroll to a different time thinking it's in a position.

    I will test this tomorrow to see I can generate this same error in my sim account. I suspect it might be an issue because earlier today I enables in sim a practice strategy and was getting yellow in them not understanding why.

    -Alex

    Comment


      #3
      Hello AlexJetski,

      Thank you for your post.

      This is expected behavior. When the strategy name is showing as yellow this indicates you currently have a position and therefore will not take another position until flat.

      If you would like to disable this feature please go to Tools-->Options-->Strategies tab-->NinjaScript tab-->Enable "Immediately submit live working historical orders"-->Click Ok.

      Please let me know if I may be of further assistance.
      Christopher J.NinjaTrader Customer Service

      Comment


        #4
        Hi Christopher,

        I just tried that. I am getting now weird behaviors. Any time I now scroll through time, I immediately show that I have a buy to cover stop placed but there is no position initiated and simulation is still paused and how not even started. This is not how NT6.5 was working. Anytime I would scroll, it would reset the simulation and all trades and start over with the strategy.

        -Alex

        Comment


          #5
          Alex,

          Any time you scroll you are recalculating your strategy position. You are definitely resetting your trades and starting over again as you jump around time in the replay.

          Each time you jump time, the newly calculated strategy position determines if you need to buy-to-cover, etc.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Hi Josh,

            Right that is the way it should work. What I am seeing is that every time I scroll the replay, I see a new buytocover and if I look in the strategies tab, I see now myscalp at green and also see in this case $310 loss from a short position, with a especific average price. However the executions tab, it shows nothing, as no trades have been taken. Makes no sense. Also if I in chart trader, hit the close button to cancel that phantom trade, the buytocover gets cancelled, but in the strategies tab, it still shows me an unrealized profit. If I hit the buy market button, it now shows a new trade in the executions, and if I close that, then finally in strategies tab in myscalp it shows 0 in unrealized. That does not sound right IMHO

            -Alex

            Comment


              #7
              Alex,

              I am not sure I follow you exactly, but please be sure you do not have sync account position set to true. I suggest you try with the SampleMACrossOver strategy to see the expected behavior as that would be the simplest case possible.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              591 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              342 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              555 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              552 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X