
This strategy combines three technical indicators - Relative Strength Index (RSI), Average Directional Index (ADX), and Ichimoku Cloud - to construct a multi-factor trend-following quantitative trading strategy. The main idea is to use the RSI indicator to determine overbought and oversold conditions, the ADX indicator to gauge trend strength, and the Ichimoku Cloud to identify trend direction. It also incorporates moving average crossover signals to open long or short positions when specific conditions are met.
This strategy innovatively combines three technical indicators - RSI, ADX, and Ichimoku Cloud - to construct a multi-factor trend-following quantitative trading strategy. The strategy has certain advantages in trend tracking and risk control, but also faces risks such as parameter optimization, market risk, and transaction costs. In the future, the strategy can be optimized through parameter optimization, stop-loss and take-profit, position sizing, and multi-timeframe and multi-asset application to improve its stability and profitability.
/*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)