資源の読み込みに... 荷物...

複数の指標によるトレンド逆転取引戦略

作者: リン・ハーンチャオチャン,日付: 2024-01-23 15時33分59秒
タグ:

img

概要

これは,価格のトレンド逆転点を特定するために複数の指標を組み合わせる戦略です. 基本的な考え方は,単一の指標だけではトレンド逆転を完璧に識別することができないということです. したがって,同様の機能を持つ複数の指標を選択し,それらを組み合わせます. そのため,複数の指標が同時に購入/売却信号を与える場合,私たちはトレンド逆転の比較的高い確率を確認し,取引決定を下すことができます.

戦略の論理

戦略は5つの異なる指標を組み合わせる.これらの5つの指標はすべて価格動向を判断する能力を持っています.これらは:

  1. コラルトレンドインジケーター: 価格トレンドを決定するために,3倍またはそれ以上の順序の指数的な平滑移動平均の組み合わせを使用します
  2. SSLチャネル: 移動平均を組み合わせて価格チャネルと傾向を決定する
  3. ハイキンアシRSI:RSIインジケーターを日内平均値と組み合わせ,トレンドを決定する
  4. MACD DEMA: 傾向を決定するために,二重指数移動平均値とMACDを組み合わせます.
  5. WaveTrend オシレーター: 価格チャネルによるトレンドを決定する

この戦略の取引論理は,上記5つの指標のうち,任意の1つまたはそれ以上の指標が組み合わせに選択できるということです.複数の選択された指標がバーで同時に購入/売却信号を与える場合にのみ,我々はそれに応じてロング/ショートポジションを開きます.

例えば,Coral Trend と SSL Channel の 2 つの指標を選択すると,両方が同時に買い信号を出せば,ロング,両方が同時に売り信号を出せばショートになります.

このようなマルチインジケーター検証によって,取引シグナルの信頼性が大幅に向上し,個々のインジケーターによる誤解を回避できます.

戦略 の 利点

  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

もっと