Advertisement
Guest User

Big 3 Indicator TradingView

a guest
Apr 5th, 2019
3,259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. //@version=3
  2. study("Big 3",overlay=true)
  3.  
  4. // enter on Arrows
  5. // take profit on touch with 80 SMA, gray, or at discretion
  6.  
  7. fast = sma(close,20)
  8. mid = sma(close,40)
  9. slow = sma(close,80)
  10.  
  11. plot(fast,linewidth=1)
  12. plot(mid,linewidth=2)
  13. plot(slow,linewidth=4)
  14.  
  15. isUptrend = close > fast and close > mid and close > slow
  16. isDowntrend = close < fast and close < mid and close < slow
  17.  
  18. confirmed = (low > fast and low > mid and low > slow) or (high < fast and high < mid and high < slow)
  19.  
  20. barcolor(isUptrend ? green : isDowntrend ? red : gray)
  21. plotshape(not confirmed[1] and confirmed and isUptrend ? close : na,style=shape.arrowup,location=location.belowbar,color=green)
  22. plotshape(not confirmed[1] and confirmed and isDowntrend ? close : na,style=shape.arrowdown,location=location.abovebar,color=red)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement