It plots HH/LL/LH/HL as histogram, pretty neat.
https://se.tradingview.com/script/KMVvr ... owest-Low/
Image
Code: Select all
//@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)
Think this is the first part of the code, done in mt5 by Mladen hereTransparentTrader wrote: Sun Apr 30, 2023 6:15 am Adding in my +1 here. At 46 lines of what looks like straightforward code, it would be really cool if one of the resident coders on Forex-Station could port this indicator into MT4 format.