Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- study(title = "The Lark: Timed Range w/ Breakouts", overlay=true)
- ////// CHANGE THESE FOR YOUR PREFERED OPEN AND CLOSE RANGE //////
- Range = "0400-0800"
- // MinutesOpen calculates the bars back for hh and ll,
- // enter the amount of minutes the range above is.
- MinutesOpen = 60 * 4
- ////////////////////////////////////////////////////////////////
- range(res,ses) => time(res, ses) != 0
- ors = range("1", Range)
- mino = MinutesOpen / interval
- hh = ors ? highest(mino) : hh[1]
- ll = ors ? lowest(mino) : ll[1]
- col1 = close[2] < hh and open > hh and open < close[1] ? #FF00DC : open > hh ? #6ABF23 : white
- col2 = close[2] > ll and open < ll and open > close[1] ? #FF00DC : close < ll ? #6ABF23 : white
- plot(ors ? na:hh,color=col1,style=circles,linewidth=2)
- plot(ors ? na:ll,color=col2,style=circles,linewidth=2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement