MarcoValente

HH&LL (Highest High and Lowest Low)

620
It show us HH and LL, OB line and OS can regulate as you like ; histogram is the difference between the hh and ll, and show the strenght of the trend. Can use also the adaptive bands for the OB/OS level.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
//@version=2
study("HH&LL") // highest high & lowest low
length=input(20)
ww=input(false,title="use adaptive OS/OB ?")
qq=input(true,title="use backround signal color?")
his=input(true,title="Show Histogram?")
useCurrentRes = input(true, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? (Uncheck Box Above).", type=resolution, defval="D")
res = useCurrentRes ? period : resCustom
HHH =iff( high > high[1], (high - lowest( high, length )) /( highest( high, length ) - lowest( high, length ) ), 0 ) 
LLL = iff( low < low[1],( highest( low, length ) - low ) /( highest( low, length ) - lowest( low, length ) ), 0 ) 
HHSa = ema( HHH, length ) * 100 
LLSa = ema( LLL, length ) * 100 
HHS = security(tickerid, res,HHSa)
LLS= security(tickerid, res, LLSa)
aa=plot( HHS, "HHS" ,color=blue,transp=0) 
bb=plot( LLS, "LLS" ,color=red,transp=0) 	
hln=input(60)
lln=input(10)
smo=input(50,"Bands Filter length")
hs=highest(max(HHS,LLS),50)
lw=lowest(min(LLS,HHS),50)
mh=ema(hs,20)
RMSa= sum( mh*mh, smo)
RMS= avg(sqrt(RMSa/smo),hln)
al=ww?RMS:hln
ms=ema(lw,20)
MSa= sum( ms*ms, smo)
MS= avg(sqrt(MSa/smo),lln)
bs=ww?MS:lln
col=HHS>al and HHS[2]<HHS[1] and HHS[1]>HHS and LLS<bs?1:0
cor=LLS>al and LLS[2]<LLS[1] and LLS[1]>LLS and HHS<bs?1:0
con=HHS<bs and HHS[2]>HHS[1] and HHS[1]<HHS and LLS>al?1:0
cod=LLS<bs and LLS[2]>LLS[1] and LLS[1]<LLS and HHS>al?1:0
bc=col or cod?red: cor or con?green:na
a=plot(al,style=cross,color=black,transp=50)
b=plot(bs,style=cross,color=black,transp=50)
df=abs(HHS-LLS)
cl=df>55?red : df<25?green :orange
plot(his?df:na,color=cl,style=histogram,linewidth=2,transp=75)
plot(HHS>al?HHS:na,style=histogram,histbase=60,color=red)
plot(LLS>al?LLS:na,style=histogram,histbase=60,color=red)
plot(LLS<bs?LLS:na,style=histogram,histbase=10,color=green)
plot(HHS<bs?HHS:na,style=histogram,histbase=10,color=green)
bgcolor(qq?bc:na,transp=80)