
この戦略は,相対的に強い弱指数 ((RSI),平均方向指数 ((ADX) と一目平衡図 ((Ichimoku Cloud) の3つの技術指標を組み合わせて,多要素のトレンドを追跡する量化取引戦略を構築している.戦略の主な考え方は,RSI指標を使用して,市場の超買超売り状況を判断し,ADX指標は,トレンドの強さを判断し,一目平衡図は,トレンドの方向を判断し,移動平均線の交差信号と組み合わせて,特定の条件を満たすときにポジションを開き,オーバーまたは空にするものである.
この戦略は,RSI,ADX,一目平衡グラフの3つの技術指標を革新的に組み合わせて,多要素のトレンド追跡量化取引戦略を構築している.戦略は,トレンド追跡とリスク管理の点で一定の優位性を持っているが,パラメータ最適化,市場リスクおよび取引コストなどのリスクも存在している.将来,パラメータ最適化,ストップ・ロス,ポジション管理,多周期多種種のアプリケーションなどの方法で戦略を最適化して,その安定性と収益性を向上させることができる.
/*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)