Advertisement
Maurizio-Ciullo

Indicatore Livelli 4 Hours OHLC

Jan 26th, 2022 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © Maurizio-Ciullo
  3.  
  4. //@version=4
  5.  
  6. study(title="Livelli 4 Hours OHLC", shorttitle="Hourly_OHLC", overlay=true)
  7.  
  8. //Start Detecting Hourly Highs/Lows //////////////////////////////////////
  9.  
  10. swt = input(true, title="Show This Hourly OHLC?")
  11. wtdo = security(syminfo.tickerid, '240', open)
  12. wpdo = security(syminfo.tickerid, '240', open [1])
  13. wpc = security(syminfo.tickerid, '240', close)
  14. wpdc = security(syminfo.tickerid, '240', close [1])
  15. wph = security(syminfo.tickerid, '240', high)
  16. wpdh = security(syminfo.tickerid, '240', high [1])
  17. wpl = security(syminfo.tickerid, '240', low)
  18. wpdl = security(syminfo.tickerid, '240', low[1])
  19.  
  20. //Daily Plots
  21. plot(swt and wtdo ? wtdo : na, title="4_Hours Open", style=plot.style_circles, linewidth=1, color=color.silver)
  22. plot(swt and wpc ? wpc : na, title="4_Hours Close", style=plot.style_circles, linewidth=1, color=color.fuchsia)
  23. plot(swt and wph ? wph : na, title="4_Hours High", style=plot.style_circles, linewidth=1, color=color.green)
  24. plot(swt and wpl ? wpl : na, title="4_Hours Low", style=plot.style_circles, linewidth=1, color=color.red)
  25.  
  26. //End Detecting Hourly Highs/Lows //////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement