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.

Hi!

We have an automated Renko strategy, you can test out this strategy or take help from its code here, https://kb.mycoder.pro/apibridge/renko-strategy-automation-using-tradingview/

We have a free automated strategies library for TradingView users here, https://kb.mycoder.pro/apibridge/faqs-on-tradingview-algotrading/.

Hope this resolves your issue!