Advertisement
3VFF3H_MONS

autofib

May 26th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. study("AFEXT", overlay=true, max_bars_back= 89)
  2. z = input (50)
  3. p_offset=input(3)
  4. charttf = input(true, title = "use chart timeframe?")
  5. resin = input("240",type = string, title = "resolution")
  6. res = charttf ? period : resin
  7.  
  8. b=security(tickerid,res,lowest(z))
  9. c=security(tickerid,res,highest(z))
  10.  
  11. p1c = close > c[p_offset] ? true : false
  12. p1 = security(tickerid,res,p1c)
  13.  
  14. p8c = close < b[p_offset] ? true : false
  15. p8 = security(tickerid,res,p8c)
  16.  
  17. plotshape(p1, title = "greaterthan", style = shape.triangledown, location = location.abovebar, size = size.normal, color = red)
  18. plotshape(p8, title = "lessthanrthan", style = shape.triangleup, location = location.belowbar, size = size.normal, color = green)
  19.  
  20. plot(b, color =red, style=line,linewidth = 3)
  21. plot(c, color =green, style=line,linewidth = 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement