Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // © adnanmurat
- //@version=4
- study("MrtComboV1.2", shorttitle="MrtComboV1.2")
- CCI = input(true, title="CCI line")
- ccilength=input(34, "CCI lenght")
- wmalength=input(13, title="CCI soft ")
- v4=0.1*(cci(close, ccilength)/4)
- v3=wma(v4, wmalength)
- v1=(exp(2*v3)-1)/(exp(2*v3)+1)
- plot(v1, color=v1 > 0 ? color.lime : color.red, linewidth=2, style=plot.style_area, display=display.all, title="DRSI-buy-sell",transp=85)
- period_ = input(21, title="Vortex lenght", minval=2)
- VMA = sum ( abs( high - low[1]), period_ )
- VMS = sum( abs ( low - high[1]), period_ )
- STR = sum( atr(1), period_ )
- v11 = VMA / STR
- v21 = VMS / STR
- src_fast = close
- len_fast = input(5, minval=1, title="DRSI-d fast")
- src_slow = close
- len_slow = input(14, minval=1, title="DRSI-d slow")
- up_fast = rma(max(change(src_fast), 0), len_fast)
- down_fast = rma(-min(change(src_fast), 0), len_fast)
- rsi_fast = down_fast == 0 ? 100 : up_fast == 0 ? 0 : 100 - 8 / (1 + up_fast / down_fast)
- up_slow = rma(max(change(src_slow), 0), len_slow)
- down_slow = rma(-min(change(src_slow), 0), len_slow)
- rsi_slow = down_slow == 0 ? 100 : up_slow == 0 ? 0 : 100 - 8 / (1 + up_slow / down_slow)
- d1 = rsi_fast - rsi_slow
- plot(d1, color=d1 > 0 ? color.lime : color.red, display=display.all, linewidth=2, title="DRSI-buy-sell")
- fmal = input(3, "First Average length"), smal = input(1, "Second Average length")
- tmal = fmal + smal, Fmal = smal + tmal, Ftmal = tmal + Fmal, Smal = Fmal + Ftmal
- M1 = wma(close, fmal),M2 = wma(M1, smal), M3 = wma(M2, tmal), M4 = wma(M3, Fmal), M5 = wma(M4, Ftmal), MAVW = wma(M5, Smal)
- col1 = MAVW > MAVW[1], col3 = MAVW < MAVW[1]
- MI = input(true, title="BS")
- l1 = close > MAVW and close[1] <= MAVW[1], s1 = close < MAVW and close[1] >= MAVW[1]
- longCond = MI ? l1 : col1,
- shortCond = MI ? s1 : col3
- last_signal = 0
- long_op = longCond and (nz(last_signal[1]) == 0 or nz(last_signal[1]) == -1)
- long_cl = shortCond and (nz(last_signal[1]) == 0 or nz(last_signal[1]) == 1)
- cciup =input(title="Trigger cciup", defval=0.3)
- ccidown = input(title="Trigger ccidown", defval=-0.4)
- long_o = long_op
- long_c = long_cl
- plotshape(long_o, title="Long Open", text="Open", location=location.bottom, style=shape.arrowup, size=size.auto, color=color.green, textcolor=color.white)
- plotshape(long_c, title="Long Close", text="Close", location=location.top, style=shape.arrowdown, size=size.auto, color=color.red, textcolor=color.white)
Advertisement
Add Comment
Please, Sign In to add comment