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")
- rsiSource = input(title="rsi source", type=input.source, defval=close)
- rsiLenght = input(title="rsi lenght", type=input.integer, defval=5)
- rsi = rsi(rsiSource, rsiLenght)
- len = input(21, minval=1, title="Length")
- high_ = highest(hl2, len)
- low_ = lowest(hl2, len)
- round_(val) => val > .99 ? .999 : val < -.99 ? -.999 : val
- value = 0.0
- value := round_(.66 * ((hl2 - low_) / max(high_ - low_, .001) - .5) + .67 * nz(value[1]))
- fish1 = 0.0
- fish1 := .5 * log((1 + value) / max(1 - value, .001)) + .5 * nz(fish1[1])
- fish2 = fish1[1]
- up5 = crossover(fish1, fish2) and fish1 < -1.5
- down5 = crossunder(fish1, fish2) and fish1 > 0
- 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)
- KJlength = input(26, "Kijunsen Length", minval=1)
- SBlength = input(52, "SenkouspanB Length", minval=1)
- KJ = avg(lowest(KJlength), highest(KJlength))
- SB = avg(lowest(SBlength), highest(SBlength))
- Buyi = crossover(KJ, SB[26])
- Selli = crossover(SB[26], KJ)
- cciup =input(title="Trigger cciup", defval=0.3)
- ccidown = input(title="Trigger ccidown", defval=-0.4)
- vortexBlue = input(title="Trigger vortexBlue", defval=1.1)
- vortexRed =input(title="Trigger vortexRed", defval=1.08)
- rrsiup = input(title="Trigger RSI long_o", defval=62)
- rrsidown = input(title="Trigger RSI long_o", defval=50)
- p10 = input(title="Plot adjustment", defval= 0.4)
- p11 = v1 + d1
- p13 = v1 > 0
- p14 = d1 > 0
- p15 = v1 < 0
- p16 = d1 < 0
- p17 = p11 > p10
- // (rsi >= rrsiup) (rsi >= rrsidown)
- long_o = long_op
- long_c = long_cl
- Short_o = d1 < 0 and (v1<=ccidown and v21>=vortexRed) and down5 or long_cl and rrsiup // ikinci logn close sonrası
- Short_c = d1 > 0 and v21>=vortexRed and (up5 or long_op) and rrsidown
- 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)
- //plotshape(Short_o, title="Short Open", text="Short", location=location.top, style=shape.arrowdown, size=size.auto, color=color.red, textcolor=color.white)
- //plotshape(Short_c, title="Short Close", text="Short", location=location.bottom, style=shape.arrowup, size=size.normal, color=color.red, textcolor=color.white)
Advertisement
Add Comment
Please, Sign In to add comment