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 Monthly OHLC", shorttitle="Monthly OHLC", overlay=true, precision=8)
- //Startd Detecting Monthly Highs/Lows //////////////////////////////////////
- swt = input(true, title="Show This Month OHLC?")
- wtdo = security(tickerid, 'M', open)
- wpdo = security(tickerid, 'M', open[1])
- wpc = security(tickerid, 'M', close)
- wpdc = security(tickerid, 'M', close[1])
- wph = security(tickerid, 'M', high)
- wpdh = security(tickerid, 'M', high[1])
- wpl = security(tickerid, 'M', low)
- wpdl = security(tickerid, 'M', low[1])
- //monthly Plots
- plot(swt and wtdo ? wtdo : na, title="Monthly Open", style=line, linewidth=2, color=black,transp=0)
- plot(swt and wpc ? wpc : na, title="Monthly Close", style=cross, linewidth=1, color=fuchsia,transp=0)
- plot(swt and wph ? wph : na, title="Monthly High", style=circles, linewidth=1, color=green,transp=0)
- plot(swt and wpl ? wpl : na, title="Monthly Low", style=circles, linewidth=1, color=red,transp=0)
- //End Detecting Monthly Highs/Lows //////////////////////////////////////
Add Comment
Please, Sign In to add comment