该策略通过结合相对强弱指数(RSI)、平均方向指数(ADX)和一目均衡图(Ichimoku Cloud)三个技术指标,构建了一个多因子趋势跟踪量化交易策略。策略的主要思路是利用RSI指标判断市场超买超卖情况,ADX指标判断趋势强度,一目均衡图判断趋势方向,并结合移动平均线的交叉信号,在满足特定条件时开仓做多或做空。
该策略通过创新性地结合RSI、ADX和一目均衡图三个技术指标,构建了一个多因子趋势跟踪量化交易策略。策略在趋势跟踪和风险控制方面具有一定优势,但同时也存在参数优化、市场风险和交易成本等风险。未来可以通过参数优化、止损止盈、仓位管理和多周期多品种应用等方式对策略进行优化,以提高其稳定性和盈利能力。
/*backtest start: 2023-05-11 00:00:00 end: 2024-05-16 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Stratejim RSI, ADX ve Ichimoku ile", overlay=true, margin_long=100, margin_short=100) // ADX, RSI ve Ichimoku tanımları [diPlus, diMinus, adx] = ta.dmi(14, 14) rsiPeriod = 14 rsi = ta.rsi(close, rsiPeriod) tenkanPeriod = 9 kijunPeriod = 26 senkouSpanBPeriod = 52 displacement = 26 tenkan = ta.sma((high + low) / 2, tenkanPeriod) kijun = ta.sma((high + low) / 2, kijunPeriod) senkouSpanA = (tenkan + kijun) / 2 senkouSpanB = ta.sma((high + low) / 2, senkouSpanBPeriod) // Ichimoku Bulutu koşulları priceAboveCloud = close > ta.valuewhen(bar_index, math.max(senkouSpanA, senkouSpanB), displacement) priceBelowCloud = close < ta.valuewhen(bar_index, math.min(senkouSpanA, senkouSpanB), displacement) // Uzun pozisyon için koşullar longSmaCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28)) longAdxCondition = adx > 20 longRsiCondition = rsi < ta.sma(rsi, rsiPeriod) if (longSmaCondition and longAdxCondition and not longRsiCondition and priceAboveCloud) strategy.entry("My Long Entry Id", strategy.long) // Kısa pozisyon için koşullar shortSmaCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28)) shortAdxCondition = adx > 20 shortRsiCondition = rsi > ta.sma(rsi, rsiPeriod) if (shortSmaCondition and shortAdxCondition and not shortRsiCondition and priceBelowCloud) strategy.entry("My Short Entry Id", strategy.short)