RicardoSantos

[RS]MTF Intraday Dayly Range V0

calculation to display a dayly donchian channel at any intraday timeframe.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//@version=2
study(title='[RS]MTF Intraday Dayly Range V0', shorttitle='IDR', overlay=true)
d_h = highest(1440/interval)
d_l = lowest(1440/interval)
d_range = d_h - d_l
mid = avg(d_h, d_l)
plot(title='Daily Range 100%'   , series=mid + d_range * 1.000  , style=circles, color=gray     , linewidth=1)
plot(title='Daily Range 87.5%'  , series=mid + d_range * 0.875  , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range 75%'    , series=mid + d_range * 0.750  , style=circles, color=gray     , linewidth=1)
plot(title='Daily Range 62.5%'  , series=mid + d_range * 0.625  , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range 50%'    , series=mid + d_range * 0.500  , style=line   , color=black    , linewidth=2)
plot(title='Daily Range 37.5%'  , series=mid + d_range * 0.375  , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range 25%'    , series=mid + d_range * 0.250  , style=circles, color=gray     , linewidth=1)
plot(title='Daily Range 12.5%'  , series=mid + d_range * 0.125  , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range 0%'     , series=mid                    , style=line   , color=navy     , linewidth=1)
plot(title='Daily Range -12.5%' , series=mid + d_range * -0.125 , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range -25%'   , series=mid + d_range * -0.250 , style=circles, color=gray     , linewidth=1)
plot(title='Daily Range -37.5%' , series=mid + d_range * -0.375 , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range -50%'   , series=mid + d_range * -0.500 , style=line   , color=black    , linewidth=2)
plot(title='Daily Range -62.5%' , series=mid + d_range * -0.625 , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range -75%'   , series=mid + d_range * -0.750 , style=circles, color=gray     , linewidth=1)
plot(title='Daily Range -87.5%' , series=mid + d_range * -0.875 , style=circles, color=silver   , linewidth=1)
plot(title='Daily Range -100%'  , series=mid + d_range * -1.000 , style=circles, color=gray     , linewidth=1)