Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. study(title="Willy MACD", shorttitle="WillyMACD_[MTG]")
  2. length = input(21, minval=1)
  3. upper = highest(length)
  4. lower = lowest(length)
  5. out = (close - lower) / (upper - lower)
  6. src = out, len = input(13, minval=1, title="Length")
  7. out2 = ema(out,6)
  8. out3 = ema(out,8)
  9. macd = ema(out2-out3,3)
  10. plot(out2-0.54, title="EMA", color=red)
  11. plot(out3-0.54, title="EMA", color=white)
  12. plot(6.618*macd, title="EMA", color=aqua, transp=85, style = area)
  13. fill(hline(0.3,color=teal),hline(-0.3,color=teal), color=blue)
  14.  
  15. // ------------------------
  16.  
  17. timeinrange(res, sess) => time(res, sess) != 0
  18. premarket = #80E680
  19. regular = #FFE680
  20. postmarket = #FF4D4D
  21. notrading = na
  22. sessioncolor = timeinrange("30", "0200-0900") ? premarket : timeinrange("30", "0900-1600") ? regular : timeinrange("30", "1600-2000") ? postmarket : notrading
  23. bgcolor(sessioncolor, transp=85)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement