Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- study(title = "Date Highlighter", overlay=true)
- HighDay = input(25, "Day")
- HighMonth = input(12, "Month")
- HighYear = input(2018, "Year")
- HighPeriod = timestamp(HighYear,HighMonth,HighDay,0,0)
- HighPeriodEnd = timestamp(HighYear,HighMonth,HighDay,12,0)
- HighBackground = input(title="Color Background?", type=bool, defval=true)
- HighBackgroundColor = HighBackground and time >= HighPeriod and time <= HighPeriodEnd ? maroon : na
- bgcolor(HighBackgroundColor, transp=50)
- testPeriod() =>
- time >= HighPeriod and time <= HighPeriodEnd ? true : false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement