리소스 로딩... 로딩...

다중 지표 트렌드 역전 거래 전략

저자:차오장, 날짜: 2024-01-23 15:33:59
태그:

img

전반적인 설명

이 전략은 가격의 트렌드 전환점을 식별하기 위해 여러 지표를 결합하는 전략입니다. 기본 아이디어는 단일 지표만으로 트렌드 전환을 완벽하게 식별하는 것이 종종 실패한다는 것입니다. 따라서 우리는 유사한 기능을 가진 여러 지표를 선택하고 결합하여 여러 지표가 동시에 구매 / 판매 신호를 제공하면 트렌드 전환의 상대적으로 높은 확률을 확인하고 거래 결정을 내릴 수 있습니다.

전략 논리

전략은 조합을 위해 5개의 다른 지표를 선택합니다. 이 5개의 지표들은 모두 가격 추세를 판단할 수 있습니다.

  1. 산호 트렌드 지표: 가격 트렌드를 결정하기 위해 삼배 또는 더 높은 순위 지수 평형 이동 평균의 조합을 사용합니다.
  2. SSL 채널: 이동 평균을 결합하여 가격 채널과 트렌드를 결정합니다.
  3. 하이킨 아시 RSI: 트렌드를 결정하기 위해 RSI 지표와 내일 평균을 결합합니다.
  4. MACD DEMA: 트렌드를 결정하기 위해 이중 지수적 이동 평균과 MACD를 결합합니다.
  5. 웨이브트렌드 오시레이터: 가격 채널에 따라 트렌드를 결정합니다.

전략의 거래 논리는 위의 5개 지표 중 1개 또는 그 이상의 지표가 조합을 위해 선택될 수 있다는 것입니다. 선택된 여러 지표가 바에 동시에 구매/판매 신호를 내면만 우리는 그에 따라 긴/단한 포지션을 열 수 있습니다.

예를 들어, 우리가 2개의 지표를 선택하면: 코럴 트렌드 및 SSL 채널. 우리는 둘 다 동시에 구매 신호를 제공 할 때만 길게 갈 것이고, 둘 다 동시에 판매 신호를 제공 할 때만 짧게 갈 것입니다.

이러한 다중 지표 검증을 통해 거래 신호의 신뢰성이 크게 향상되고 개별 지표에 의해 오해되는 것을 피할 수 있습니다.

전략 의 장점

  1. 여러 지표의 조합을 사용하면 높은 확률로 트렌드 반전 상황을 식별하고 거래 승률을 향상시킬 수 있습니다.
  2. 각 지표는 신호를 더 포괄적이고 정확하게 만들기 위해 다른 계산 방법을 사용합니다.
  3. 1~5개 지표를 임의로 선택하여 유연한 조합
  4. 다양한 시장에서 최적화를 위해 각 지표에 대한 자세한 매개 변수 설정이 제공됩니다.
  5. 길고 짧은 점을 식별하는 민감도를 조정하기 위해 제공된 뷰백 윈도우 매개 변수

위험 과 해결책

  1. 개별 지표의 잘못된 위험

    • 해결책: 여러 지표의 조합을 통해 확인
  2. 부적절한 매개 변수 설정은 너무 민감하거나 둔화 될 수 있습니다.

    • 솔루션: 다른 시간 프레임과 제품에 기반한 매개 변수를 반복적으로 테스트하고 최적화합니다.
  3. 특정 지표 간 차기

    • 해결책: 적절한 룩백 시간 창을 설정

전략 최적화의 방향

  1. 추세 판단 지표의 더 많은 유형을 테스트하고 조합을 풍부하게하기 위해 지표 풀을 확장하십시오.
  2. 기계 학습 알고리즘을 강화하여 최적의 지표 조합을 자동으로 식별합니다.
  3. 동적 매개 변수 조정에 대한 매개 변수 적응 최적화 모듈을 추가
  4. 트렌드 반전을 식별하기 위해 감정 지표, 기본 지표 등을 결합합니다.
  5. 거래 위험을 통제하기 위한 정량적 위험 관리 모델을 개발

결론

이 전략은 전반적으로 비교적 신뢰할 수있는 트렌드 역전 거래 전략을 달성했습니다. 멀티 지표 검증을 사용하는 아이디어는 큰 다재다능성과 뛰어난 확장성을 가지고 있습니다. 기계 학습 및 동적 매개 변수 최적화와 같은 기술을 사용하는 추가 최적화로 성능이 더욱 향상 될 수 있으며 심층 연구와 응용 가치가 있습니다.


/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
//@author=iori86
//Any trade decisions you make are entirely your own responsibility//

strategy('GT 5.1 Strategy', 'GT 5.1 Strategy •', true, default_qty_type=strategy.cash)
string GROUP_6="STRATEGY OPTIONS"
dec1 = input(true,"HARSI", group=GROUP_6)
harsi_back = input.int(6, 'Lookback HARSI', group=GROUP_6, minval=1, maxval=32)
dec2 = input(true,"SSL", group=GROUP_6)
ssl_back = input.int(1, 'Lookback SSL', group=GROUP_6, minval=0, maxval=4)
dec3 = input(true,"CORAL", group=GROUP_6)
coral_back = input.int(4, 'Lookback CORAL', group=GROUP_6, minval=1, maxval=10)
dec4 = input(false,"MACD DEMA", group=GROUP_6)
macd_back =input.int(0, 'Lookback MACD DEMA', group=GROUP_6, minval=0, maxval=10)
dec5 = input(false,"WAVE TREND", group=GROUP_6)
wave_back=input.int(0, 'Lookback WAVE', group=GROUP_6, minval=0, maxval=10)

//================================================================HARSI============================================================================//

string GROUP_1 = 'Config » HARSI'
i_lenHARSI = input.int(14, 'Length', group=GROUP_1, minval=1)
i_smoothing = input.int(7, 'Open Smoothing', group=GROUP_1, minval=1, maxval=100)
f_zrsi(_source, _length) => ta.rsi(_source, _length) - 50
f_zstoch(_source, _length, _smooth, _scale) =>
    float _zstoch = ta.stoch(_source, _source, _source, _length) - 50
    float _smoothed = ta.sma(_zstoch, _smooth)
    float _scaled = (_smoothed / 100 )* _scale
f_rsi(_source, _length, _mode) =>
    float _zrsi = f_zrsi(_source, _length)
    var float _smoothed = na
    _smoothed := na(_smoothed[1]) ? _zrsi : (_smoothed[1] + _zrsi) / 2
    _mode ? _smoothed : _zrsi
f_rsiHeikinAshi(_length) =>
    float _closeRSI = f_zrsi(close, _length)
    float _openRSI = nz(_closeRSI[1], _closeRSI)
    float _highRSI_raw = f_zrsi(high, _length)
    float _lowRSI_raw = f_zrsi(low, _length)
    float _highRSI = math.max(_highRSI_raw, _lowRSI_raw)
    float _lowRSI = math.min(_highRSI_raw, _lowRSI_raw)
    float _close = (_openRSI + _highRSI + _lowRSI + _closeRSI) / 4
    var float _open = na
    _open := na(_open[i_smoothing]) ? (_openRSI + _closeRSI) / 2 : ((_open[1] * i_smoothing) + _close[1]) / (i_smoothing + 1)
    float _high = math.max(_highRSI, math.max(_open, _close))
    float _low = math.min(_lowRSI, math.min(_open, _close))
    [_open, _high, _low, _close]
[O, H, L, C] = f_rsiHeikinAshi(i_lenHARSI)

//=======================================================================SSL=======================================================================//

string GROUP_2 = 'Config » SSL Channel'
int len = input.int(10, 'Period', group=GROUP_2)
float smaHigh = ta.sma(high, len)
float smaLow = ta.sma(low, len)
float Hlv = na
Hlv := close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]
float sslDown = Hlv < 0 ? smaHigh : smaLow
float sslUp = Hlv < 0 ? smaLow : smaHigh
plot(sslDown, linewidth=2, color=color.new(color.red, 0))
plot(sslUp, linewidth=2, color=color.new(color.lime, 0))

//=======================================================================CORAL=======================================================================//

string GROUP_3 = 'Config » Coral Trend Candles'
src = close
sm = input.float(9, 'Smoothing Period', group=GROUP_3, minval=1)
cd = input.float(0.4, 'Constant D', group=GROUP_3, minval=0.1)
float di = (sm) / 2.0 + 1.0
float c1 = 2 / (di + 1.0)
float c2 = 1 - c1
float c3 = 3.0 * (cd * cd + cd * cd * cd)
float c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd)
float c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd
var float i1 = na
var float i2 = na
var float i3 = na
var float i4 = na
var float i5 = na
var float i6 = na
i1 := c1 * src + c2 * nz(i1[1])
i2 := c1 * i1 + c2 * nz(i2[1])
i3 := c1 * i2 + c2 * nz(i3[1])
i4 := c1 * i3 + c2 * nz(i4[1])
i5 := c1 * i4 + c2 * nz(i5[1])
i6 := c1 * i5 + c2 * nz(i6[1])
var float bfr = na
bfr := -cd * cd * cd * i6 + c3 * i5 + c4 * i4 + c5 * i3
color bfrC = bfr > nz(bfr[1]) ? color.green : bfr < nz(bfr[1]) ? color.red : color.blue
plot(bfr, title='Trend', linewidth=3, style=plot.style_circles, color=bfrC)

//=======================================================================MACD DEMA=======================================================================//
string GROUP_4 = 'Config » MACD DEMA'
sma = input(12,title='DEMA Short', group=GROUP_4)
lma = input(26,title='DEMA Long', group=GROUP_4)
tsp = input(9,title='Signal', group=GROUP_4)
//dolignes = input(true,title="Lines", group=GROUP_4)

MMEslowa = ta.ema(close,lma)
MMEslowb = ta.ema(MMEslowa,lma)
DEMAslow = ((2 * MMEslowa) - MMEslowb )
MMEfasta = ta.ema(close,sma)
MMEfastb = ta.ema(MMEfasta,sma)
DEMAfast = ((2 * MMEfasta) - MMEfastb)
LigneMACDZeroLag = (DEMAfast - DEMAslow)
MMEsignala = ta.ema(LigneMACDZeroLag, tsp)
MMEsignalb = ta.ema(MMEsignala, tsp)
Lignesignal = ((2 * MMEsignala) - MMEsignalb )
MACDZeroLag = (LigneMACDZeroLag - Lignesignal)
swap1 = MACDZeroLag>0?color.green:color.red

//plot(MACDZeroLag,'Histo',color=swap1,histbase=0)
//p1 = plot(dolignes?LigneMACDZeroLag:na,"LigneMACD",color.blue)
//p2 = plot(dolignes?Lignesignal:na,"Signal",color.red)
//fill(p1, p2, color.blue)
hline(0)

//=======================================================================WAVE TREND=======================================================================//
string GROUP_5 = 'Config » WAVE TREND'

n1 = input(10, "Channel Length", group=GROUP_5)
n2 = input(21, "Average Length", group=GROUP_5)
//obLevel1 = input(60, "Over Bought Level 1", group=GROUP_5)
//obLevel2 = input(53, "Over Bought Level 2", group=GROUP_5)
//osLevel1 = input(-60, "Over Sold Level 1", group=GROUP_5)
//osLevel2 = input(-53, "Over Sold Level 2", group=GROUP_5)
ap = hlc3 
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1,4)
//plot(0,"a" ,color.gray)
//plot(obLevel1,"a", color.red)
//plot(osLevel1,"a", color.green)
//plot(obLevel2,"a", color.red)
//plot(osLevel2,"a", color.green)
//plot(wt1,"a", color.green)
//plot(wt2,"a", color.red)
//plot(wt1-wt2,"a",color.blue, 1)

//=======================================================================CONDITIONS=======================================================================//
bool checker_1   = false   // HARSI BUY
bool checker_11  = false   // HARSI lookback BUY
bool checker_2   = false   // HARSI SELL
bool checker_21  = false   // HARSI lookback SELL
bool checker_3   = false   // SSL AL
bool checker_31  = false   // SSL lookback 0 dan büyükse al
bool checker_4   = false   // SSL SAT
bool checker_41  = false   // SSL lookback 0 dan büyükse sat
bool checker_5   = false   // CORAL AL
bool checker_51  = false   // CORAL lookback 1 den büyükse al
bool checker_6   = false   // CORAL SAT
bool checker_61  = false   // CORAL lookback 1 den büyükse sat
bool checker_7   = false   // MACD AL
bool checker_71  = false   // MACD lookback 0 dan büyükse al
bool checker_8   = false   // MACD SAT
bool checker_81  = false   // MACD lookback 0 dan büyükse sat
bool checker_9   = false   // WAVE AL
bool checker_91  = false   // WAVE lookback 0 dan büyükse al
bool checker_10  = false   // WAVE SAT
bool checker_101 = false   // WAVE lookback 0 dan büyükse sat


//=======================================================================HARSI=======================================================================//
if harsi_back==1
    if ( C > O and C[1] < O[1] and C > C[1])
        checker_1 := true
//HARSI SELL                
    if (C < O and C[1] > O[1] )
        checker_2 := true
// HARSI BUY
if harsi_back>1
    int say_1=0
    while harsi_back>say_1 and checker_11 == false
        if ( C[say_1] > O[say_1] and C[say_1+1] < O[say_1+1] and C[say_1] > C[say_1+1])
            checker_11 := true
        say_1:=say_1+1
    int say_2=0   
    while harsi_back>say_2 and checker_21 == false        
        if (C[say_2] < O[say_2] and C[say_2+1] > O[say_2+1])
            checker_21 := true
        say_2:=say_2+1
//=======================================================================SSL=======================================================================//
if ssl_back==0
    if (ta.crossover(sslUp, sslDown))
        checker_3 := true
    if (ta.crossover(sslDown, sslUp))
        checker_4 := true
if ssl_back>0
    int say_3=0
    while ssl_back>=say_3 and checker_31==false
        if (sslUp[say_3]>sslDown[say_3] and sslUp[say_3+1]<sslDown[say_3+1] )
            checker_31 := true
        say_3:=say_3+1
    int say_4=0
    while ssl_back>=say_4 and checker_41==false
        
        if (sslUp[say_4]<sslDown[say_4] and sslUp[say_4+1]>sslDown[say_4+1])
            checker_41 := true
        say_4:=say_4+1    
//======================================================================CORAL=======================================================================//
if coral_back==1
    if(bfrC == color.green and bfrC[1] == color.red)
        checker_5 := true
    if(bfrC == color.red and bfrC[1] == color.green)
        checker_6 := true
if coral_back>1
    int say_5=0
    while coral_back>say_5 and checker_51 == false
        if(bfrC[say_5] == color.green and bfrC[say_5+1] == color.red)
            checker_51 := true
        say_5 := say_5+1
    int say_6=0
    while coral_back>say_6 and checker_61 == false
        if(bfrC[say_6] == color.red and bfrC[say_6+1] == color.green)
            checker_61 := true
        say_6 := say_6+1
            

//=======================================================================MACD=======================================================================//
if macd_back==0 
    if ta.crossover(LigneMACDZeroLag,Lignesignal)
        checker_7 := true
    if ta.crossover(Lignesignal,LigneMACDZeroLag) 
        checker_8 := true
        
        
if macd_back>0
    int say_7=0
    while macd_back>=say_7 and checker_71==false
        if ta.crossover(LigneMACDZeroLag[say_7],Lignesignal[say_7])
            checker_71 := true
        say_7:=say_7+1
    int say_8=0
    while macd_back>=say_8 and checker_81==false
        if ta.crossover(Lignesignal[say_8],LigneMACDZeroLag[say_8])
            checker_81 := true
        say_8:=say_8+1   
//=======================================================================WAVE TREND=======================================================================//
if wave_back ==0
    if ta.crossover(wt1,wt2)
        checker_9  := true
    if ta.crossover(wt2,wt1)
        checker_10 :=true
if wave_back>0
    int say_9 =0
    while wave_back>=say_9 and checker_91==false
        if (ta.crossover(wt1[say_9],wt2[say_9]))
            checker_91 := true
        say_9:=say_9+1
    int say_10=0
    while wave_back>=say_10 and checker_101==false
        if (ta.crossover(wt2[say_10],wt1[say_10]))
            checker_101 := true
        say_10:=say_10+1   
//=======================================================================BUY=======================================================================//
var buy  = false
var sell = true
//=======================================================================TEK SEÇENEK=======================================================================//
if buy == false and sell==true
//dec1
    if dec1 == true and dec2==false and dec3== false and dec4==false and dec5==false
        if checker_1 or checker_11
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec2
    if dec2 == true and dec1==false and dec3== false and dec4==false and dec5==false
        if checker_3 or checker_31
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up,textcolor= color.white, size=size.small, text="SSL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true   
//dec3
    if dec3 == true and dec2==false and dec1== false and dec4==false and dec5==false
        if checker_5 or checker_51
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up,textcolor= color.white, size=size.small, text="CORAL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true  
//dec4    
    if dec4 == true and dec2==false and dec3== false and dec1==false and dec5==false
        if checker_7 or checker_71
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true      
//dec5    
    if dec5 == true and dec1==false and dec2== false and dec3==false and dec4==false
        if checker_9 or checker_91
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true   
//=======================================================================2 SEÇENEK=======================================================================// 
//dec1-dec2
    if dec1 == true and dec2==true and dec3== false and dec4== false and dec5== false
        if (checker_1== true or checker_11==true) and (checker_3 == true or checker_31 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec1 dec3
    if dec1 == true and dec2==false and dec3== true and dec4== false and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_5 == true or checker_51 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n CORAL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec1 dec4
    if dec1 == true and dec2==false and dec3== false and dec4== true and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_7 == true or checker_71 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec1 dec5
    if dec1 == true and dec2==false and dec3== false and dec4== false and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec2 dec3
    if dec1 == false and dec2==true and dec3== true and dec4== false and dec5== false
        if (checker_3 == true or checker_31==true) and (checker_5 == true or checker_51 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n CORAL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec2 dec4
    if dec1 == false and dec2==true and dec3== false and dec4== true and dec5== false
        if (checker_3 == true or checker_31==true) and (checker_7 == true or checker_71 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec2 dec5
    if dec1 == false and dec2==true and dec3== false and dec4== false and dec5== true
        if (checker_3 == true or checker_31==true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//dec3 dec4
    if dec1 == false and dec2==false and dec3== true and dec4== true and dec5== false
        if (checker_5 == true or checker_51==true) and (checker_7 == true or checker_71 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="CORAL\n MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true               
//dec3 dec5
    if dec1 == false and dec2==false and dec3== true and dec4== false and dec5== true
        if (checker_5 == true or checker_51==true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="CORAL\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true            
//dec4 dec5
    if dec1 == false and dec2==false and dec3== false and dec4== true and dec5== true
        if (checker_7 == true or checker_71==true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="MACD\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true               
//=======================================================================3 SEÇENEK=======================================================================//
// dec 1 dec2 dec3
    if dec1 == true and dec2==true and dec3 == true and dec4 ==false and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_5 == true or checker_51 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL\n\n CORAL")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec1 dec2 dec4
    if dec1 == true and dec2==true and dec3 == false and dec4 ==true and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_7 == true or checker_71 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL\n\n MACD ")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec1 dec2 dec5
    if dec1 == true and dec2==true and dec3 == false and dec4 ==false and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL\n\n WAVE ")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec1 dec3 dec4
    if dec1 == true and dec2==false and dec3 == true and dec4 ==true and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n CORAL\n\n MACD ")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec1 dec3 dec5
    if dec1 == true and dec2==false and dec3 == true and dec4 ==false and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_5 == true or checker_51 == true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n CORAL\n\n WAVE ")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec1 dec4 dec5
    if dec1 == true and dec2==false and dec3 == false and dec4 ==true and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_7 == true or checker_71 == true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n MACD\n\n WAVE ")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec2 dec3 dec4
    if dec1 == false and dec2==true and dec3 == true and dec4==true and dec5== false
        if (checker_3 == true or checker_31==true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 == true) 
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n CORAL\n\n MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec2 dec3 dec5
    if dec1 == false and dec2==true and dec3== true and dec4== false and dec5== true
        if (checker_3 == true or checker_31==true) and (checker_5 == true or checker_51 == true) and (checker_9 == true or checker_91==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n CORAL\n\n  WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
// dec2 dec4 dec5
    if dec1 == false and dec2==true and dec3== false and dec4== true and dec5== true
        if (checker_3 == true or checker_31==true) and (checker_7 == true or checker_71 == true) and (checker_9 == true or checker_91==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n MACD\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true            
// dec3 dec4 dec5
    if dec1 == false and dec2==false and dec3 == true and dec4 ==true and dec5== true
        if (checker_5 == true or checker_51==true) and (checker_7 == true or checker_71 == true) and (checker_9 == true or checker_91 == true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="CORAL\n MACD\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true
//=======================================================================4 SEÇENEK=======================================================================//
//dec1 dec2 dec3 dec4
    if dec1 == true and dec2==true and dec3 == true and dec4==true and dec5== false
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 ==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n CORAL\n\n CORAL\n\n\n MACD")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true        
//dec1 dec3 dec4 dec5
    if dec1 == true and dec2==false and dec3 == true and dec4==true and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 == true) and (checker_9 == true or checker_91 ==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n CORAL\n\n MACD\n\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true 
//dec1 dec2 dec4 dec5
    if dec1 == true and dec2==true and dec3 == false and dec4==true and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_7 == true or checker_71 == true) and (checker_9 == true or checker_91 ==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL\n\n MACD\n\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true 
//dec1 dec2 dec3 dec5
    if dec1 == true and dec2==true and dec3 == true and dec4==false and dec5== true
        if (checker_1 == true or checker_11==true) and (checker_3 == true or checker_31 == true) and (checker_5 == true or checker_51 == true) and (checker_9 == true or checker_91 ==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="HARSI\n SSL\n\n CORAL\n\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true 
//dec2 dec3 dec4 dec5
    if dec1 == false and dec2==true and dec3 == true and dec4==true and dec5== true 
        if (checker_3 == true or checker_31 == true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 ==true) and (checker_9 == true or checker_91==true)
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SSL\n CORAL\n\n MACD\n\n\n WAVE")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true 
//=======================================================================5 SEÇENEK=======================================================================//
//dec1 dec2 dec3 dec4 dec5
    if dec1 == true and dec2==true and dec3 == true and dec4==true and dec5== true 
        if (checker_1 == true or checker_11) and (checker_3 == true or checker_31 == true) and (checker_5 == true or checker_51 == true) and (checker_7 == true or checker_71 ==true) and (checker_9 == true or checker_91==true) 
            label.new(bar_index, low-ta.tr, color=color.green,style= label.style_label_up, size=size.small, text="SUPER BUY")
            strategy.entry("long", strategy.long)
            sell:= false
            buy:=true 
               
//=======================================================================SELL=======================================================================//
//=======================================================================TEK SEÇENEK=======================================================================//
if buy == true and sell==false
//dec1
    if dec1 == true and dec2==false and dec3== false and dec4==false and dec5==false
        if checker_2 or checker_21
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
//dec2
    if dec2 == true and dec1==false and dec3== false and dec4==false and dec5==false
        if checker_4 or checker_41
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false   
//dec3
    if dec3 == true and dec2==false and dec1== false and dec4==false and dec5==false
        if checker_6 or checker_61
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="CORAL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec4    
    if dec4 == true and dec2==false and dec3== false and dec1==false and dec5==false
        if checker_8 or checker_81
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false     
//dec5    
    if dec5 == true and dec1==false and dec2== false and dec3==false and dec4==false
        if checker_10 or checker_101
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false   
//=======================================================================2 SEÇENEK=======================================================================//
//dec1-dec2
    if dec1 == true and dec2==true and dec3== false and dec4== false and dec5== false
        if (checker_2==true or checker_21==true) and (checker_4 or checker_41 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec1 dec3
    if dec1 == true and dec2==false and dec3== true and dec4== false and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_6 == true or checker_61 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n CORAL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec1 dec4
    if dec1 == true and dec2==false and dec3== false and dec4== true and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec1 dec5
    if dec1 == true and dec2==false and dec3== false and dec4== false and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec2 dec3
    if dec1 == false and dec2==true and dec3== true and dec4== false and dec5== false
        if (checker_4 == true or checker_41==true) and (checker_6 == true or checker_61 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n CORAL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec2 dec4
    if dec1 == false and dec2==true and dec3== false and dec4== true and dec5== false
        if (checker_4 == true or checker_41==true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec2 dec5
    if dec1 == false and dec2==true and dec3== false and dec4== false and dec5== true
        if (checker_4 == true or checker_41==true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
 //dec3 dec4
    if dec1 == false and dec2==false and dec3== true and dec4== true and dec5== false
        if (checker_6 == true or checker_61==true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="CORAL\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false   
//dec3 dec5
    if dec1 == false and dec2==false and dec3== true and dec4== false and dec5== true
        if (checker_6 == true or checker_61==true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="CORAL\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false             
//dec4 dec5
    if dec1 == false and dec2==false and dec3== false and dec4== true and dec5== true
        if (checker_8 == true or checker_81==true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="MACD\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false             
//=======================================================================3 SEÇENEK=======================================================================//
// dec1 dec2 dec3
    if dec1 == true and dec2==true and dec3 == true and dec4 ==false and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_6 == true or checker_61 == true)
            label.new(bar_index, high+ta.tr/2, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n CORAL")
            strategy.entry("short", strategy.short)
            sell:= true
            buy := false
// dec1 dec2 dec4
    if dec1 == true and dec2==true and dec3 == false and dec4 ==true and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr/2, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy := false
// dec1 dec2 dec5
    if dec1 == true and dec2==true and dec3 == false and dec4 ==false and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr/2, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n MACD ")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec1 dec3 dec4
    if dec1 == true and dec2==false and dec3 == true and dec4 ==true and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n CORAL\n\n MACD ")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false  
// dec1 dec3 dec5
    if dec1 == true and dec2==false and dec3 == true and dec4 ==false and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_6 == true or checker_61 == true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n MACD ")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec1 dec4 dec5
    if dec1 == true and dec2==false and dec3 == false and dec4 ==true and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_8 == true or checker_81 == true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n MACD\n\n WAVE ")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec2 dec3 dec4
    if dec1 == false and dec2==true and dec3 == true and dec4==true and dec5== false
        if (checker_4 == true or checker_41==true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n CORAL\n\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec2 dec3 dec5
    if dec1 == false and dec2==true and dec3== true and dec4== false and dec5== true
        if (checker_4 == true or checker_41==true) and (checker_6 == true or checker_61 == true) and (checker_10 == true or checker_101==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n CORAL\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec2 dec4 dec5
    if dec1 == false and dec2==true and dec3== false and dec4== true and dec5== true
        if (checker_4 == true or checker_41==true) and (checker_8 == true or checker_81 == true) and (checker_10 == true or checker_101==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n CORAL\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
// dec3 dec4 dec5
    if dec1 == false and dec2==false and dec3 == true and dec4 ==true and dec5== true
        if (checker_6 == true or checker_61==true) and (checker_8 == true or checker_81 == true) and (checker_10 == true or checker_101 == true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="CORAL\n MACD\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
//=======================================================================4 SEÇENEK=======================================================================//
//dec1 dec2 dec3 dec4
    if dec1 == true and dec2==true and dec3 == true and dec4==true and dec5== false
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 ==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n CORAL\n\n\n MACD")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false        
//dec1 dec3 dec4 dec5
    if dec1 == true and dec2==false and dec3 == true and dec4==true and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 == true) and (checker_10 == true or checker_101 ==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n CORAL\n\n MACD\n\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
//dec1 dec2 dec4 dec5
    if dec1 == true and dec2==true and dec3 == false and dec4==true and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_8 == true or checker_81 == true) and (checker_10 == true or checker_101 ==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n MACD\n\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
//dec1 dec2 dec3 dec5
    if dec1 == true and dec2==true and dec3 == true and dec4==false and dec5== true
        if (checker_2 == true or checker_21==true) and (checker_4 == true or checker_41 == true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 ==true)
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="HARSI\n SSL\n\n CORAL\n\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false 
//dec2 dec3 dec4 dec5
    if dec1 == false and dec2==true and dec3 == true and dec4==true and dec5== true 
        if (checker_4 == true or checker_41 == true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 ==true) and (checker_10 == true or checker_101==true) 
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SSL\n CORAL\n\n MACD\n\n\n WAVE")
            strategy.entry("short", strategy.short)
            sell:= true
            buy:=false
//=======================================================================5 SEÇENEK=======================================================================//
//dec1 dec2 dec3 dec4 dec5
    if dec1 == true and dec2==true and dec3 == true and dec4==true and dec5== true 
        if (checker_2 == true or checker_21) and (checker_4 == true or checker_41 == true) and (checker_6 == true or checker_61 == true) and (checker_8 == true or checker_81 ==true) and (checker_10 == true or checker_101==true) 
            label.new(bar_index, high+ta.tr, color=color.red,style= label.style_label_down, size=size.small, text="SUPER SELL")
            strategy.entry("short", strategy.short)            
            sell:= true
            buy:=false

더 많은