Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // © TheProfessorDev
  2. //@version=4
  3.  
  4. study("Strategy by itrade(DJ), Coded by Prof. D", overlay=true)
  5.  
  6. mult = input(type=input.float, defval=3)
  7. len = input(type=input.integer, defval=10)
  8. [superTrend, dir] = supertrend(mult, len)
  9.  
  10. // TRADE CONDITIONS
  11.  
  12. Long = crossover(ema(close,10),ema(close,20)) and rsi(close,14) > 60 and close > vwap and  dir == -1 and volume > sma(volume,20)
  13. Short = crossunder(ema(close,10),ema(close,20)) and rsi(close,14) < 40 and close < vwap and dir == 1 and volume > sma(volume,20)
  14.  
  15. // PLOT
  16.  
  17. plotshape(Long, title="long", text="Long", textcolor=color.white, style=shape.labelup, location=location.belowbar, color=color.green, transp=0, size=size.tiny)
  18. plotshape(Short, title="short", text="Short", textcolor=color.white, style=shape.labeldown, location=location.abovebar, color=color.red, transp=0, size=size.tiny)
  19. plot(ema(low,10), title="EMA", color=color.white, linewidth=1)
  20.  
  21. // ALERTS
  22.  
  23. alertcondition(Long, title="Long", message="Long")
  24. alertcondition(Short, title="Short", message="Short")