RicardoSantos

[RS]MTF CATR Stop Hunt Levels V0

EXPERIMENTAL:
Adaptation from stop hunt levels:
Uses timeframe and atr to set ranges.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
study(title='[RS]MTF CATR Stop Hunt Levels V0', overlay=true)
tf = input(title='Timeframe:', defval='D', type=string)
src = input(title='Source', type=source, defval=close)
multiplier = input(title='Range Multiplier:', type=float, defval=1, step=0.01)

catr(_m) => (cum(tr)/(n+1))*_m

d_open = security(tickerid, tf, round(src/catr(1))*catr(1))
d_high = security(tickerid, tf, round(1+src/catr(1))*catr(1))
d_low = security(tickerid, tf, round(src/catr(1)-1)*catr(1))

d_open_buy = d_open+catr(multiplier)
d_open_sel = d_open-catr(multiplier)
d_high_buy = d_high+catr(multiplier)
d_high_sel = d_high-catr(multiplier)
d_low_buy = d_low+catr(multiplier)
d_low_sel = d_low-catr(multiplier)

dob = plot(title='mh', series=d_open_buy, style=circles, color=lime)
dos = plot(title='ml', series=d_open_sel, style=circles, color=red)
dhb = plot(title='hh', series=d_high_buy, style=circles, color=lime)
dhs = plot(title='hl', series=d_high_sel, style=circles, color=red)
dlb = plot(title='lh', series=d_low_buy, style=circles, color=lime)
dls = plot(title='ll', series=d_low_sel, style=circles, color=red)

fill(title='mf', plot1=dob, plot2=dos, color=blue, transp=75)
fill(title='hf', plot1=dhb, plot2=dhs, color=blue, transp=75)
fill(title='lf', plot1=dlb, plot2=dls, color=blue, transp=75)

plot(title='m', series=d_open, style=circles, color=black)
plot(title='h', series=d_high, style=circles, color=black)
plot(title='l', series=d_low, style=circles, color=black)