renko formula not matching with tradingview

 

I am trying to make Renko work like tradingview with same settings on both MT5 and tradingview

but its not plotting same as tradingview, What modification would be needed for it?

Link for tradingview renko formula  (tradingviewdotcom/support/solutions/43000502284-renko-charts/)

Source code attached for mt5

Files:
 

Trading view uses ohlc to calculate renko charts . 

That means your solution is the accurate one or the most accurate (edit : if it uses real ticks) .

from the page you shared : 

Accurate Renko brick calculation requires tick data. As a compromise, TradingView uses the chart's resolution close value or OHLC value. For example, a 10-minute Renko chart will use 10-minute closes to generate bricks. Only when the 10-minute interval has expired are all produced bricks locked in Renko history.

If your client insists trading view is right educate him

Edit : if you are using ohlc too then you need to either feed only the close as stated above , check if it matches , and make sure the chart starts at the same time (the ohlc feed) which you can't check in TV i think .

 
Lorentzos Roussos #:

Trading view uses ohlc to calculate renko charts . 

That means your solution is the accurate one or the most accurate (edit : if it uses real ticks) .

from the page you shared : 

If your client insists trading view is right educate him

Edit : if you are using ohlc too then you need to either feed only the close as stated above , check if it matches , and make sure the chart starts at the same time (the ohlc feed) which you can't check in TV i think .

There is no client. Its my research work only, just tried something which worked well on tradingview so trying to do this on mt5. Thanks I will look forward to play this with ticks and points.

I think you are saying the MT5 Renko generation is accurate and better than tradingview?

 
Rodger Sen #:

There is no client. Its my research work only, just tried something which worked well on tradingview so trying to do this on mt5. Thanks I will look forward to play this with ticks and points.

I think you are saying the MT5 Renko generation is accurate and better than tradingview?

Yes MT5 is the only platform that allows you to code a historically accurate renko chart where you can have the most "symmetry" between past and future bar formation.

You might still get a deviation of brick_size*2 depending on where you start but that is unavoidable i think.