differences between indicators in tradingview and MQL5

 
There is sometimes huge differences between MQL5 iADX/iATR from mql5 to tradingview is there a way to avoid those errors ?
 
Popof:
There is sometimes huge differences between MQL5 iADX/iATR from mql5 to tradingview is there a way to avoid those errors ?

You’ll need to contact TradingView and ask them to match MT5 - good luck with that.

Different platforms = different data, different math (smoothing methods, rounding or even data sampling). It’s normal.

 
Popof:
There is sometimes huge differences between MQL5 iADX/iATR from mql5 to tradingview is there a way to avoid those errors ?

Regarding ATR, the ATR built into Metatrader uses a slightly different formula, as far as I remember. You can write a custom ATR in MQL that uses the same formula as the pinescript version. I've done this before, but I don't have that code to hand.

I don't know about ADX, but if the formulas are different, then there are also no problems to make a custom implementation in MQL.

But when you compare indicators you must remember that in order for the indicator values ​​to match 100%, the quotes (bar prices) must also match 100%.

 
Vladislav Boyko #:
Regarding ATR, the ATR built into Metatrader uses a slightly different formula, as far as I remember.

At least, the smoothing is different. In the MT5 version SMA, in the TV version RMA

Popof:
is there a way to avoid those errors ?
These are not errors, these are, roughly speaking, different indicators.
 

Here is the source code for ADX default on tradingview. You can hire a freelancer to convert it to MQL5 for you.