noabai Posted November 9, 2024 Report Posted November 9, 2024 When comparing the tradingview ema and the ninjatrader ema, the results are different even when all the inputs are the same. This is probably due to the fact that the 2 emas are not calculated in the same way. I tried to convert the tradingview ema code here https://www.tradingview.com/pine-script-reference/v5/#fun_ta.ema into a version for NT8 but I can't do it. To understand the differences: TW : 20409.74 NT8 : 20410.55 TW : 20356.14 NT8 : 20356.79 TW : 20310.51 NT8 : 20311.03 TW : 20321.41 NT8 : 20321.83 TW : 20441.98 NT8 : 20442.31 Thanks for your help Quote
⭐ JDizzle22 Posted November 12, 2024 Report Posted November 12, 2024 It's the same calculation between ta.ema and the NT EMA. In NinjaTrader, if you don't set your calculation to OnPriceChange, the current bar is probably different. I just tested and I get all the same results for historical bars between the two (I only have realtime on NT and not TradingView). Quote
noabai Posted November 12, 2024 Author Report Posted November 12, 2024 8 hours ago, JDizzle22 said: It's the same calculation between ta.ema and the NT EMA. In NinjaTrader, if you don't set your calculation to OnPriceChange, the current bar is probably different. I just tested and I get all the same results for historical bars between the two (I only have realtime on NT and not TradingView). Thanks for your answer. You are absolutely right. Tradingview displays bars but does not calculate on them and calculates on bars that it does not display. For more details my post here: https://stackoverflow.com/questions/79172421/calculation-ema-tradingview-ninjatrader-different Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.