Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- study("AFEXT", overlay=true, max_bars_back= 89)
- z = input (50)
- p_offset=input(3)
- charttf = input(true, title = "use chart timeframe?")
- resin = input("240",type = string, title = "resolution")
- res = charttf ? period : resin
- b=security(tickerid,res,lowest(z))
- c=security(tickerid,res,highest(z))
- p1c = close > c[p_offset] ? true : false
- p1 = security(tickerid,res,p1c)
- p8c = close < b[p_offset] ? true : false
- p8 = security(tickerid,res,p8c)
- plotshape(p1, title = "greaterthan", style = shape.triangledown, location = location.abovebar, size = size.normal, color = red)
- plotshape(p8, title = "lessthanrthan", style = shape.triangleup, location = location.belowbar, size = size.normal, color = green)
- plot(b, color =red, style=line,linewidth = 3)
- plot(c, color =green, style=line,linewidth = 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement