Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=5
- // Enjoy --Dr.Vats
- indicator(title='%PDHL', shorttitle='%PDHL', overlay=true)
- FPeriod = input('D', title='Day/Week')
- Adjustment = input(1, title='0/1')
- Fhigh = request.security(syminfo.tickerid, FPeriod, high[Adjustment])
- Flow = request.security(syminfo.tickerid, FPeriod, low[Adjustment])
- F0 = Flow
- F1000 = (Fhigh - Flow) * 1.000 + Flow
- F1272 = (Fhigh - Flow) * 1.272 + Flow
- F1414 = (Fhigh - Flow) * 1.414 + Flow
- F1618 = (Fhigh - Flow) * 1.618 + Flow
- F2000 = (Fhigh - Flow) * 2 + Flow
- F2414 = (Fhigh - Flow) * 2.414 + Flow
- F3000 = (Fhigh - Flow) * 3 + Flow
- FE1272 = (Fhigh-Flow) * -0.272 + Flow
- FE1414 = (Fhigh-Flow) * -0.414 + Flow
- FE1618 = (Fhigh-Flow) * -0.618 + Flow
- FE2000 = (Fhigh-Flow) * -1 + Flow
- FE2414 = (Fhigh-Flow) * -1.414 + Flow
- FE3000 = (Fhigh-Flow) * -2 + Flow
- plot(F0, color=color.new(color.gray, 0), linewidth=2, trackprice=true, show_last=1, title='0')
- plot(F1000, color=color.new(color.gray, 0), linewidth=2, trackprice=true, show_last=1, title='1')
- plot(F1272, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.272E', transp=0)
- plot(F1414, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.414E', transp=0)
- plot(F1618, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.618E', transp=0)
- plot(F2000, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='2E', transp=0)
- plot(F2414, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='2.414E', transp=0)
- plot(F3000, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='3E', transp=0)
- plot(FE1272, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.272', transp=0)
- plot(FE1414, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.414', transp=0)
- plot(FE1618, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.618', transp=0)
- plot(FE2000, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='2', transp=0)
- plot(FE2414, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='2.414', transp=0)
- plot(FE3000, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='3', transp=0)
- plotshape(F0, style=shape.labeldown, location=location.absolute, color=color.rgb(249, 149, 50), textcolor=color.new(color.black, 0), show_last=1, text='%0', offset=-5, transp=0)
- plotshape(F1000, style=shape.labeldown, location=location.absolute, color=color.rgb(237, 220, 34), textcolor=color.new(color.black, 0), show_last=1, text='%100', offset=-5, transp=0)
- plotshape(FE1272, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='1.27', offset=-5, transp=0)
- plotshape(FE1414, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='1.41', offset=-5, transp=0)
- plotshape(FE1618, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='1.61', offset=-5, transp=0)
- plotshape(FE2000, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='2', offset=-5, transp=0)
- plotshape(FE2414, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='2.4', offset=-5, transp=0)
- plotshape(FE3000, style=shape.labeldown, location=location.absolute, color=color.rgb(252, 106, 106), textcolor=color.new(#000000, 0), show_last=1, text='3', offset=-5, transp=0)
- plotshape(F1272, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='1.27E', offset=-5, transp=0)
- plotshape(F1414, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='1.41E', offset=-5, transp=0)
- plotshape(F1618, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='1.61E', offset=-5, transp=0)
- plotshape(F2000, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='2E', offset=-5, transp=0)
- plotshape(F2414, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='2.4E', offset=-5, transp=0)
- plotshape(F3000, style=shape.labeldown, location=location.absolute, color=color.rgb(58, 10, 162), textcolor=color.new(#ffffff, 0), show_last=1, text='3E', offset=-5, transp=0)
Advertisement
Add Comment
Please, Sign In to add comment