noabai Posted Saturday at 02:07 PM Report Share Posted Saturday at 02:07 PM 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 Link to comment Share on other sites More sharing options...
orfila Posted yesterday at 04:17 PM Report Share Posted yesterday at 04:17 PM post your code Quote Link to comment Share on other sites More sharing options...
⭐ JDizzle22 Posted 9 hours ago Report Share Posted 9 hours ago 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 Link to comment Share on other sites More sharing options...
noabai Posted 44 minutes ago Author Report Share Posted 44 minutes ago 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 Link to comment Share on other sites More sharing options...
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.