Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. //@version=3
  2. study(title = "Date Highlighter", overlay=true)
  3.  
  4. HighDay = input(25, "Day")
  5. HighMonth = input(12, "Month")
  6. HighYear = input(2018, "Year")
  7. HighPeriod = timestamp(HighYear,HighMonth,HighDay,0,0)
  8. HighPeriodEnd = timestamp(HighYear,HighMonth,HighDay,12,0)
  9.  
  10. HighBackground = input(title="Color Background?", type=bool, defval=true)
  11. HighBackgroundColor = HighBackground and time >= HighPeriod and time <= HighPeriodEnd ? maroon : na
  12.  
  13. bgcolor(HighBackgroundColor, transp=50)
  14.  
  15. testPeriod() =>
  16. time >= HighPeriod and time <= HighPeriodEnd ? true : false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement