TradingView
Trendoscope
2021年1月3日上午9點40分

RSI - MTF - Non Repaint 

描述

Using rsi with security function directly will cause repaint. Hence, doing it based on close price and calculating rsi via formula to avoid that. Hope this solves repainting issue.

Thanks to @Jittra for requesting this :)

發布通知

Added option to directly use rsi passed to security method to demonstrate how they differ.

發布通知

Make use security true by default as calculations are not yielding correct results
評論
massivePython49493
If possible kindly make mtf stochastic
massivePython49493
Dear friend, excellent work down there in the script. Thank you very much. I would like to provide an opportunity to meke it even marvellous. Kindly provide auto trendline option along with volume bars. Thank you..🙏
jasmeet6842
hi,
kindly guide how to avoid repaint in 1 hr., timeframe ,
Thanks & Regards
tendollarshipping
sir
this is repainting. will you tell me how to avoid this
Harsh808
Can you please advice how to use this indicator.
Trendoscope
@Harsh808, Hi, this is just RSI on multi timeframe. I did this on someone’s request.
fareidzulkifli
Thanks for this, but i need help to understand this

I see u are using 1bar offset to avoid the repainting, but whats the role of the formula? Will it be any different if im using rsi{1] instead?

Thanks in advance!
Trendoscope
@fareidzulkifli, I have noticed that passing indicator functions directly to security causes repainting even with offset of 1. Previously I tried this with supertrend. I am not certain why. Must be something to do with the architecture of pinescript.

But, getting open, close, high, low of higher timeframe and using it to calculate indicator values are much safer option.
fareidzulkifli
@HeWhoMustNotBeNamed, i see, thanks! I guess i need to do few more experiments just to be safe
Trendoscope
@fareidzulkifli, Added option to pass rsi to security method instead of calculating it. Have a look how they differ.
更多