Maurizio-Ciullo

Indicatore Livelli Monthly OHLC

Jan 26th, 2022 (edited)
135
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 Monthly OHLC", shorttitle="Monthly OHLC", overlay=true, precision=8)
  7.  
  8. //Startd Detecting Monthly Highs/Lows //////////////////////////////////////
  9.  
  10.  
  11. swt = input(true, title="Show This Month OHLC?")
  12. wtdo = security(tickerid, 'M', open)
  13. wpdo = security(tickerid, 'M', open[1])
  14. wpc = security(tickerid, 'M', close)
  15. wpdc = security(tickerid, 'M', close[1])
  16. wph = security(tickerid, 'M', high)
  17. wpdh = security(tickerid, 'M', high[1])
  18. wpl = security(tickerid, 'M', low)
  19. wpdl = security(tickerid, 'M', low[1])
  20.  
  21. //monthly Plots
  22. plot(swt and wtdo ? wtdo : na, title="Monthly Open", style=line, linewidth=2, color=black,transp=0)
  23. plot(swt and wpc ? wpc : na, title="Monthly Close", style=cross, linewidth=1, color=fuchsia,transp=0)
  24. plot(swt and wph ? wph : na, title="Monthly High", style=circles, linewidth=1, color=green,transp=0)
  25. plot(swt and wpl ? wpl : na, title="Monthly Low", style=circles, linewidth=1, color=red,transp=0)
  26.  
  27.  
  28. //End Detecting Monthly Highs/Lows //////////////////////////////////////
  29.  
  30.  
Add Comment
Please, Sign In to add comment