Pinescript Renko Discrepancy

I am developing a strategy in Pinescript to integrate with Fyers. The strategy uses the renko function. But I see differences between Pinescript renko and Renko bars definition here https://www.investopedia.com/terms/r/renkochart.asp.

As seen below, at 14:40 Renko should not be bearish. It has to be bullish. Kindly can someone help me with homw pinescript renko works. I want to make sure I am not working on an error-ed function in pinescript.

 

1 reply