shortwire

PR High and Lows - Kallol

75
//Created by Kallol
study(title="High and Lows", shorttitle="H&L + forecast", overlay=true)
//Data setup
dHigh = security(tickerid, 'D', high)
dLow = security(tickerid, 'D', low)
dClose = security(tickerid, 'D', close)
dOpen = security(tickerid, 'D', open)

//perchange = security(tickerid, 'D', open)/security(tickerid, 'D', close)
//dcOpen=security(tickerid, 'D', open)
//plotchar(isintraday ? dOpen : na, char='C', color=red, text="ass")

plot(isintraday ? dClose : na, title="Daily Close",style=line, color=blue,linewidth=1)

lHM = plot(isintraday ? dHigh : na, title="Daily High",style=line, color=green,linewidth=1)
lHH = plot(isintraday ? dHigh * 1.0009 : na, title="Daily High",style=line, color=green,linewidth=2)
lHL = plot(isintraday ? dHigh * 0.9991 : na, title="Daily High",style=line, color=green,linewidth=2)
fill(lHH, lHL, color=green)
lLM = plot(isintraday ? dLow : na, title="Daily Low",style=line, color=red,linewidth=1)
lLH = plot(isintraday ? dLow * 1.0009 : na, title="Daily Low",style=line, color=red,linewidth=2)
lLL = plot(isintraday ? dLow * 0.9991 : na, title="Daily Low",style=line, color=red,linewidth=2)
fill(lLH, lLL, color=red)

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?