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
⭐ 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).
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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now