MarcoValente

HH&LL (Highest High and Lowest Low)

619
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.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//@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)