Thanks to PineCoders for rounding method: https://www.pinecoders.com/faq_and_code/...
Thanks to @LucF and @RicardoSantos for their advice and enlightenment as always.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Can you please help me out. For in stance for ADAUSDT I have the following tickerdata
Date Open High Low Close Open High Low Close
20210305 1.11261 1.1972 1.03374 1.15908 1.20002 1.20002 1.03374 1.12566
20210306 1.15907 1.183 1.08493 1.129 1.16284 1.183 1.08493 1.139
20210307 1.12901 1.145 1.10562 1.13042 1.15092 1.15092 1.10562 1.12751
The first 4 are for the original tickers and the last 4 are output of your Heikin-Ashi script.
If I calculate the Heikin-Ashi for 20210306, based on the open/close of 20210305 I get (1.20002 + 1.12566) / 2 = 1.135845 which is not equal to what your script calculates being 1.16284. Your script finds the same numbers as the TradingView built-in Heikin-Ashi candles so I must be doing something wrong.
Can you please explain to me?