Ni6HTH4wK

[LAVA] Relative Price Difference

This script shows the relative price difference based off the last high and low, so many bars ago. Bollinger bands are also included by default for closer inspection on the intensity of the movement or the lack thereof. Bollinger bands will follow the smoothed line which will allow the reactionary line to cross the boundary during an intense movement. With the colors selected, a gray color will appear after the color to the zero line to announce a deep correction is possible. Buy/Sell indicators show up as crosses to indicate when the price is moving in a certain direction. Sideways stagnation will have several crosses due to the close proximity to the zero line.

I use 21 in the demo here without the bollinger bands or buy/sell indicators to show the power of the script to identify bottoms and tops using the tips and hand drawn trendlines.

(This script is actually the same script as before, but listed here as the final version. Hopefully this will be my last update with this script.)

If you use and enjoy this script, please like it!
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?
study(title="[LAVA] Relative Price Difference", shorttitle="RPD_L")
len = input(14, minval=1, title="Length")
mult = input(2.0, minval=0.001, maxval=50)

high_ = highest(high, len*3)
low_ = lowest(low, len*3)
RPD = 100 - 100/(1 +((high/high_) - (low_/low)))
SRPD = swma(RPD)

dev = mult * stdev(SRPD, len*2)
upper = SRPD + dev
lower = SRPD - dev

p0 = plot(0.000001, color=black)
p1 = plot(upper, style=area, color=#FF8400, transp=65)
p2 = plot(lower, style=area, color=#007BFF, transp=65)

plot(SRPD, title="SRPD", color=red, linewidth=2)
plot(RPD, title="RPD", color=lime, linewidth=1)

LOOKUP = (cross(SRPD,1) or cross(SRPD,-1) or cross(SRPD,-1)[1]) and SRPD>SRPD[1] and SRPD[1]>SRPD[2] ? -1.5 : na
LOOKDN = (cross(SRPD,-1) or cross(SRPD,1) or cross(SRPD,1)[1]) and SRPD<SRPD[1] and SRPD[1]<SRPD[2] ? 1.5 : na
plot(LOOKUP, title="Bingo", style=cross, linewidth=3, color=green)
plot(LOOKDN, title="Bingo", style=cross, linewidth=3, color=red)