xmd79

%PDHL

May 25th, 2023
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1. //@version=5
  2. // Enjoy --Dr.Vats
  3. indicator(title='%PDHL', shorttitle='%PDHL', overlay=true)
  4. FPeriod = input('D', title='Day/Week')
  5. Adjustment = input(1, title='0/1')
  6. Fhigh = request.security(syminfo.tickerid, FPeriod, high[Adjustment])
  7. Flow = request.security(syminfo.tickerid, FPeriod, low[Adjustment])
  8. F0 = Flow
  9. F1000 = (Fhigh - Flow) * 1.000 + Flow
  10. F1272 = (Fhigh - Flow) * 1.272 + Flow
  11. F1414 = (Fhigh - Flow) * 1.414 + Flow
  12. F1618 = (Fhigh - Flow) * 1.618 + Flow
  13. F2000 = (Fhigh - Flow) * 2 + Flow
  14. F2414 = (Fhigh - Flow) * 2.414 + Flow
  15. F3000 = (Fhigh - Flow) * 3 + Flow
  16. FE1272 = (Fhigh-Flow) * -0.272 + Flow
  17. FE1414 = (Fhigh-Flow) * -0.414 + Flow
  18. FE1618 = (Fhigh-Flow) * -0.618 + Flow
  19. FE2000 = (Fhigh-Flow) * -1 + Flow
  20. FE2414 = (Fhigh-Flow) * -1.414 + Flow
  21. FE3000 = (Fhigh-Flow) * -2 + Flow
  22.  
  23. plot(F0, color=color.new(color.gray, 0), linewidth=2, trackprice=true, show_last=1, title='0')
  24. plot(F1000, color=color.new(color.gray, 0), linewidth=2, trackprice=true, show_last=1, title='1')
  25. plot(F1272, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.272E', transp=0)
  26. plot(F1414, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.414E', transp=0)
  27. plot(F1618, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='1.618E', transp=0)
  28. plot(F2000, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='2E', transp=0)
  29. plot(F2414, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='2.414E', transp=0)
  30. plot(F3000, color=color.rgb(58, 10, 162), linewidth=3, trackprice=true, show_last=1, title='3E', transp=0)
  31. plot(FE1272, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.272', transp=0)
  32. plot(FE1414, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.414', transp=0)
  33. plot(FE1618, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='1.618', transp=0)
  34. plot(FE2000, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='2', transp=0)
  35. plot(FE2414, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='2.414', transp=0)
  36. plot(FE3000, color=color.rgb(195, 72, 47), linewidth=3, trackprice=true, show_last=1, title='3', transp=0)
  37.  
  38. 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)
  39. 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)
  40. 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)
  41. 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)
  42. 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)
  43. 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)
  44. 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)
  45. 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)
  46. 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)
  47. 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)
  48. 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)
  49. 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)
  50. 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)
  51. 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