Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

cOde to decode pile and smooth curve.

Dn=hl2+(3*atr(3))
TrendUp=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up
TrendDown=close[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn
Trend = close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1)
Tsl = Trend==1? TrendUp: TrendDown
linecolor = Trend == 1 ? green : red
plotarrow(Trend == 1 and Trend[1] == -1 ? Trend : na, title="Up Entry Arrow",
colorup=lime, maxheight=60, minheight=50, transp=0)

comp curve 3 pile 4720

1644,1645 up 640kn vs 600 CONFRM IN 1.5DL

smoothrng(x, t, m)=>
wper = (t*2) - 1
avrng = ema(abs(x - x[1]), t)
smoothrng = ema(avrng, wper)*m
smoothrng
smrng = smoothrng(src, 100, 2.5)
rngfilt(x, r)=>
rngfilt = x
rngfilt := x > nz(rngfilt[1]) ? ((x - r) < nz(rngfilt[1]) ? nz(rngfilt[1]) : (x
- r)) : ((x + r) > nz(rngfilt[1]) ? nz(rngfilt[1]) : (x + r))
rngfilt
filt = rngfilt(src, smrng)
upward = 0.0
upward := filt > filt[1] ? nz(upward[1]) + 1 : filt < filt[1] ? 0 : nz(upward[1])
downward = 0.0

You might also like