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 Weekly OHLC", shorttitle="Weekly_OHLC", overlay=true)
- //Startd Detecting Weekly Highs/Lows //////////////////////////////////////
- //Weekly
- swt = input(true, title="Show This Weeks OHLC?")
- wtdo = security(tickerid, 'W', open)
- wpdo = security(tickerid, 'W', open[1])
- wpc = security(tickerid, 'W', close)
- wpdc = security(tickerid, 'W', close[1])
- wph = security(tickerid, 'W', high)
- wpdh = security(tickerid, 'W', high[1])
- wpl = security(tickerid, 'W', low)
- wpdl = security(tickerid, 'W', low[1])
- //Weekly Plots
- plot(swt and wtdo ? wtdo : na, title="Weekly Open", style=circles, linewidth=1, color=silver)
- plot(swt and wpc ? wpc : na, title="Weekly Close", style=circles, linewidth=1, color=fuchsia)
- plot(swt and wph ? wph : na, title="Weekly High", style=circles, linewidth=1, color=green)
- plot(swt and wpl ? wpl : na, title="Weekly Low", style=circles, linewidth=1, color=red)
- //End Detecting Weekly Highs/Lows //////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement