Jump to content

Can someone convert the TradingVev ema to an EMA for ninjatrader 8?


noabai

Recommended Posts

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

Link to comment
Share on other sites

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). 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...