please help me i need it

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello
I have a Renko chart whose candlestick times are based on the first price tick that plays a role in its creation.
I have problems adding the last new tick to the chart. Because the time of the Renko candle is different from the time of the online candle, I have to change the time of the last tick myself so that the tick is placed on the live Renko candle.
But apparently it doesn't work and it shows an extra candle on the chart whose time is equal to the time candle online or the downloaded time tick.
The code that adds a tick on the chart is: