Please help, who can explain to me how tradingview with pine calculate RSI and Divergence. I use indicator from here https://www.tradingview.com/script/wd38TSOH-RSI-Divergence/. But when i try to calculate manually by this formula https://www.macroption.com/rsi-calculation/ values different from indicator for pair AACBTC and interval 5 min. I assume that this because of empty candlesticks(volume = 0, trades for interval don't exist). But when i want to know values of Divergence and RSI for ETHBTC, then all good. this pair active due to trades happen all time So the question is: How tradingview with pine handles candlesticks with volume 0 or when candlestick didn't come for interval?
pine-script
doesn't make any difference if a bar includes any trades(so volume) or not. If there's a bar, then there'll be a calculation on that bar. If a script uses volume
, volume
is used as 0
.
I didn't get if you want to know exact algorithm of RSI, so I just say, that the RSI script you can find in tradingview's pine-reference, and Divergence is in examples in New
button in the pine-editor