Diese Strategie kombiniert mehrere technische Indikatoren, darunter den Relative Strength Index (RSI), die Moving Average Convergence Divergence (MACD), Bollinger Bands und das Volumen, um optimale Handelschancen zu bestimmen.
Diese Strategie kombiniert mehrere technische Indikatoren, darunter RSI, MACD, Bollinger Bands und Volumen, um ein umfassendes Handelssystem zu bilden. Die Strategie berücksichtigt verschiedene Aspekte wie Preis, Trends, Volatilität und Marktstimmung und führt das Konzept der Liquiditätszonen ein, um Handelssignale zu optimieren. Obwohl die Strategie bestimmte Vorteile hat, steht sie immer noch vor Herausforderungen wie Parameteroptimierung und Marktrisiken. In Zukunft kann die Strategie durch dynamische Parameteroptimierung, Risikomanagement und maschinelles Lernen weiter verbessert werden.
/*backtest start: 2024-05-01 00:00:00 end: 2024-05-31 23:59:59 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Optimize Edilmiş Kapsamlı Ticaret Stratejisi - Likidite Bölgeleri ile 30 Dakika", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10) // Optimize edilebilir parametreler rsiPeriod = input.int(14, minval=5, maxval=30, title="RSI Periyodu") macdShortPeriod = input.int(12, minval=5, maxval=30, title="MACD Kısa Periyodu") macdLongPeriod = input.int(26, minval=20, maxval=50, title="MACD Uzun Periyodu") macdSignalPeriod = input.int(9, minval=5, maxval=20, title="MACD Sinyal Periyodu") smaPeriod = input.int(20, minval=10, maxval=50, title="SMA Periyodu") bollingerMultiplier = input.float(2.0, minval=1.0, maxval=3.0, title="Bollinger Bantları Çarpanı") volumeSpikeMultiplier = input.float(1.5, minval=1.0, maxval=3.0, title="Hacim Artış Çarpanı") shortTermMAPeriod = input.int(50, minval=20, maxval=100, title="Kısa Dönem MA Periyodu") longTermMAPeriod = input.int(200, minval=100, maxval=300, title="Uzun Dönem MA Periyodu") liquidityZonePeriod = input.int(50, minval=10, maxval=100, title="Likidite Bölgesi Periyodu") // İndikatörleri Tanımla rsi = ta.rsi(close, rsiPeriod) [macdLine, signalLine, _] = ta.macd(close, macdShortPeriod, macdLongPeriod, macdSignalPeriod) macdHist = macdLine - signalLine basis = ta.sma(close, smaPeriod) dev = bollingerMultiplier * ta.stdev(close, smaPeriod) upperBand = basis + dev lowerBand = basis - dev volumeSpike = volume > ta.sma(volume, 20) * volumeSpikeMultiplier // Hareketli Ortalamaları Kullanarak Trend Takibi shortTermMA = ta.sma(close, shortTermMAPeriod) longTermMA = ta.sma(close, longTermMAPeriod) trendUp = shortTermMA > longTermMA trendDown = shortTermMA < longTermMA // Likidite Bölgelerini Belirleme liquidityZoneHigh = ta.highest(high, liquidityZonePeriod) liquidityZoneLow = ta.lowest(low, liquidityZonePeriod) // Likidite Bölgelerini Çiz plot(liquidityZoneHigh, color=color.red, title="Likidite Bölgesi Üst") plot(liquidityZoneLow, color=color.green, title="Likidite Bölgesi Alt") // Sinyal Durumlarını Saklamak İçin Değişkenler var bool inPosition = false var bool isBuy = false // Al ve Sat Sinyali Bayrakları var bool buyFlag = false var bool sellFlag = false // Bayrakları Sıfırla buyFlag := false sellFlag := false // Al ve Sat Sinyallerini Tanımla var bool buySignal = false var bool sellSignal = false if (barstate.isconfirmed) buySignal := ((rsi < 30 and close < lowerBand and close > liquidityZoneLow) or (macdHist > 0 and trendUp and close > ta.highest(high, 10)[1] and close > liquidityZoneLow) or (volumeSpike and close > upperBand and close > liquidityZoneLow)) sellSignal := ((rsi > 70 and close > upperBand and close < liquidityZoneHigh) or (macdHist < 0 and trendDown and close < ta.lowest(low, 10)[1] and close < liquidityZoneHigh) or (volumeSpike and close < lowerBand and close < liquidityZoneHigh)) // Aynı Sinyali Tekrarlamamak İçin Kontroller if (buySignal and (not inPosition or not isBuy)) inPosition := true isBuy := true buyFlag := true sellFlag := false strategy.entry("Buy", strategy.long) if (sellSignal and inPosition and isBuy) inPosition := false isBuy := false sellFlag := true buyFlag := false strategy.close("Buy") // Sinyalleri Grafiğe Çiz plotshape(series=buyFlag, location=location.belowbar, color=color.green, style=shape.labelup, text="AL") plotshape(series=sellFlag, location=location.abovebar, color=color.red, style=shape.labeldown, text="SAT") // Hareketli Ortalamaları ve Bollinger Bantlarını Çiz plot(shortTermMA, color=color.blue, title="50 MA") plot(longTermMA, color=color.orange, title="200 MA") plot(upperBand, color=color.red, title="Üst Bant") plot(lowerBand, color=color.green, title="Alt Bant")