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:	98
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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      79 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X