Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=4
- study(title="Market Cipher A", shorttitle="Cipher A", overlay=true)
- //EMA Ribbon
- ema1 = input(5)
- ema2 = input(11)
- ema3 = input(15)
- ema4 = input(18)
- ema5 = input(21)
- ema6 = input(24)
- ema7 = input(28)
- ema8 = input(34)
- ema1_ = ema(close, ema1)
- ema2_ = ema(close, ema2)
- ema3_ = ema(close, ema3)
- ema4_ = ema(close, ema4)
- ema5_ = ema(close, ema5)
- ema6_ = ema(close, ema6)
- ema7_ = ema(close, ema7)
- ema8_ = ema(close, ema8)
- plot(ema1_, color=#265aa6, linewidth=2, transp=50, title="EMA 1")
- plot(ema2_, color=#265aa6, linewidth=2, transp=50, title="EMA 2")
- plot(ema3_, color=#1976d2, linewidth=2, transp=50, title="EMA 3")
- plot(ema4_, color=#1976d2, linewidth=2, transp=50, title="EMA 4")
- plot(ema5_, color=#7fb3ff, linewidth=2, transp=50, title="EMA 5")
- plot(ema6_, color=#7fb3ff, linewidth=2, transp=50, title="EMA 6")
- plot(ema7_, color=#bbdefb, linewidth=2, transp=50, title="EMA 7")
- plot(ema8_, color=#bbdefb, linewidth=2, transp=50, title="EMA 8")
- Longema = crossover(ema2_, ema8_)
- plotshape(Longema, style=shape.circle, color=color.green, transp=45, location=location.abovebar, size=size.tiny, title="Long EMA Signal")
- Redcross = crossunder(ema1_, ema2_)
- plotshape(Redcross, style=shape.xcross, color=color.red, transp=45, location=location.abovebar, size=size.tiny, title="Red cross")
- Bluetriangle = crossover(ema2_, ema3_)
- plotshape(Bluetriangle, style=shape.triangleup, color=#0064ff, transp=45, location=location.abovebar, size=size.small, title="Blue Triangle")
- alertcondition(Redcross != 0, "RedX", "RedX")
- alertcondition(Longema != 0, "Longema", "Longema")
- alertcondition(Bluetriangle != 0, "Bluetriangle", "Bluetriangle")
- n1 = input(9, "WT Channel Length")
- n2 = input(12, "WT Average Length")
- obLevel = input(60, "WT Over Bought Level")
- osLevel = input(-60, "WT Over Sold Level")
- yellowXLevel = -50
- ap = hlc3
- esa = ema(ap, n1)
- d = ema(abs(ap - esa), n1)
- ci = (ap - esa) / (0.015 * d)
- tci = ema(ci, n2)
- wt1 = tci
- wt2 = sma(wt1, 3)
- redDiamond = cross(wt1, wt2) and wt2 - wt1 > 0
- plotshape(redDiamond, style=shape.diamond, color=color.red, location=location.abovebar, size=size.tiny, title="Red Diamond", transp=25)
- bloodDiamond = cross(wt1, wt2) and wt2 - wt1 > 0 and Redcross
- plotshape(bloodDiamond, style=shape.diamond, color=color.red, location=location.abovebar, size=size.small, title="Blood Diamond", transp=25)
- yellowCross = cross(wt1, wt2) and wt2 - wt1 > 0 and wt2 < yellowXLevel
- plotshape(yellowCross, style=shape.xcross, color=color.yellow, location=location.abovebar, size=size.small, title="Yellow Cross", transp=25)
- alertcondition(redDiamond != 0, "Red Diamond", "Red Diamond")
- alertcondition(bloodDiamond != 0, "Blood Diamond", "Blood Diamond")
- alertcondition(yellowCross != 0, "YellowX", "YellowX")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement