Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- study(title="Willy MACD", shorttitle="WillyMACD_[MTG]")
- length = input(21, minval=1)
- upper = highest(length)
- lower = lowest(length)
- out = (close - lower) / (upper - lower)
- src = out, len = input(13, minval=1, title="Length")
- out2 = ema(out,6)
- out3 = ema(out,8)
- macd = ema(out2-out3,3)
- plot(out2-0.54, title="EMA", color=red)
- plot(out3-0.54, title="EMA", color=white)
- plot(6.618*macd, title="EMA", color=aqua, transp=85, style = area)
- fill(hline(0.3,color=teal),hline(-0.3,color=teal), color=blue)
- // ------------------------
- timeinrange(res, sess) => time(res, sess) != 0
- premarket = #80E680
- regular = #FFE680
- postmarket = #FF4D4D
- notrading = na
- sessioncolor = timeinrange("30", "0200-0900") ? premarket : timeinrange("30", "0900-1600") ? regular : timeinrange("30", "1600-2000") ? postmarket : notrading
- bgcolor(sessioncolor, transp=85)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement