TradingView
fikira
10 มกรา 2020 เวลา 19 นาฬิกา 23 นาที

[fikira] Divergences (RSI) 

Algorand / TetherUSBinance

คำอธิบาย

This script can be used with candlesticks, accompanied with "[fikira] RSI + Divergences"

The calculation is different than my "Divergences (Pivots)"

Thank you!

เอกสารเผยแพร่

Small improvements
ความคิดเห็น
Lij_MC
Are divergences in real time or 2 bars out?
Repaint?
fikira
@Lij_MC, It is about pivot points, it checks if the highest/lowest IS the highest/lowest, so the minimal bars at the right of the specific points is always at least 1 bar,
since for having a highest/lowest , the bar next to it needs to be lower/higher.

Then you can compare (divergences), so it always will lag 1 bar behind, seeing this at replay gives the impression it lags 2 bars, but this is just because it skips the period during 1 bar. I real time you will see the last Div blinking during the last bar period, when it closes, the arrow stays.

This is not repainting ;)
hughlxj
Thank you !But,"The function 'valuewhen' should be called on each calculation for consistency. It is recommended to extract the call from the ternary operator or from the scope."How to solve this problem?
fikira
@hughlxj, This is a relative 'old' script of me, the newer one don't have this issue
hughlxj
@fikira, Thank you for your reply.Where to modify? How to solve this problem?please!
fikira
@hughlxj, Learn pine :)
hughlxj
@fikira, OK!THANKS...
Crypto_Sisyphe
hi! Thank you for the great job! Can you explain briefly what is the "margin" setting and why it is useful?
fikira
@Crypto_Sisyphe, Hi,

Well, sometimes with too much margin you get too much lines:


While margin 0 gives less lines:


Both has it advantages and disadvantages, the one gives too much lines, the other misses sometimes lines,
so you can play with it until you find what is right for you,
thanks!
Crypto_Sisyphe
@fikira, Thank you for your answer, but the thing i don't get is the equation ex: ll1 > (ll2_ - ((ll2_ - ll0) * m). I guess it kinda fix a threshold for ll1 not to interfere too much with the line ll2 -> ll0 but i can't wrap my mind about how it works
เพิ่มเติม