Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © Maurizio-Ciullo
- //@version=4
- study(title="Livelli 4 Hours OHLC", shorttitle="Hourly_OHLC", overlay=true)
- //Start Detecting Hourly Highs/Lows //////////////////////////////////////
- swt = input(true, title="Show This Hourly OHLC?")
- wtdo = security(syminfo.tickerid, '240', open)
- wpdo = security(syminfo.tickerid, '240', open [1])
- wpc = security(syminfo.tickerid, '240', close)
- wpdc = security(syminfo.tickerid, '240', close [1])
- wph = security(syminfo.tickerid, '240', high)
- wpdh = security(syminfo.tickerid, '240', high [1])
- wpl = security(syminfo.tickerid, '240', low)
- wpdl = security(syminfo.tickerid, '240', low[1])
- //Daily Plots
- plot(swt and wtdo ? wtdo : na, title="4_Hours Open", style=plot.style_circles, linewidth=1, color=color.silver)
- plot(swt and wpc ? wpc : na, title="4_Hours Close", style=plot.style_circles, linewidth=1, color=color.fuchsia)
- plot(swt and wph ? wph : na, title="4_Hours High", style=plot.style_circles, linewidth=1, color=color.green)
- plot(swt and wpl ? wpl : na, title="4_Hours Low", style=plot.style_circles, linewidth=1, color=color.red)
- //End Detecting Hourly Highs/Lows //////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement