Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. //@version=4
  2. study("Volatility Bars")
  3. h= (swma(avg(high, high[1], high[2])))
  4. l= (swma(avg(low, low[1], low[2])))
  5. c= input(close, "Source", type = input.source)
  6. o= ((swma(open)))
  7.  
  8. a = cum(tr) - cum(tr)[720]
  9. b = cum(tr)[720] - cum(tr)[1440]
  10. C = a/b
  11. plotcandle(o, h, l, c, wickcolor = color.black, color = C < .75 ? color.white: C > 1.25 ? color.yellow : c > o ? color.blue : c < o ? color.red : color.white)
  12. plotshape(c, location = location.absolute, style = shape.diamond, color = C < .75 ? color.white: C > 1.25 ? color.yellow : c > o ? color.blue : color.red, size = size.auto, transp = 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement