Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving Average data is behind by 5 minutes

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

    Moving Average data is behind by 5 minutes

    Click image for larger version

Name:	image.png
Views:	108
Size:	29.8 KB
ID:	1303924​Im new to ninjatrader and ninjascript. I am trying to test out a crossover strategy but there seems to be a delay from when the crossover happens to when the trade executes. I understand that the strategy waits for the close and then enters but It seems to be about 2 candles behind. When I test this same strategy on other platforms such as Thinkorswim or tradingview, It works as intended. And the Crossovers seem to be different on ninja than on thinkorswim and tradingview.

    #2
    Hello ExtremelyRough,

    Is this a historical order or in a backtest? If so the trades execution would be shown on the bar following where the condition is true. In realtime the executions would appear on the bar where the condition was true.

    Comment


      #3
      You need to tell each indicator that you use (moving averages in this case) to update on EACH TICK or on PRICE CHANGE not on BAR CLOSE. When the bar closes the indicator updates normally in NT which makes it lagging - hence why your averages don't touch the candles until it is the next candle, and why they are lagging so incredibly.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      474 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      315 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      253 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      340 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      305 views
      0 likes
      Last Post CarlTrading  
      Working...
      X