
多重動量指数トレンド追跡量化取引戦略は,指数移動平均 ((EMA),相対的に強い指数 ((RSI) と移動平均収束分散指数 ((MACD) を組み合わせた複合型量化取引方法である.この戦略は,複数の技術指標を統合することによって,取引信号の正確性と信頼性を向上させることを目的としており,特に波動性の高い市場の短線および中線取引に適している.
この戦略の核となる原則は,複数の指標を組み合わせて検証することです.
特定取引シグナル生成のルール:
多重動量指数トレンド追跡量化取引戦略は,EMA,RSI,MACDの3つの重要な技術指標を統合して,比較的ロブストな取引信号生成システムを構築しています. この戦略は,十分な柔軟性を保ち,強力なリスク管理能力を備えており,量化トレーダーに深く研究に値する取引プログラムを提供します.
/*backtest
start: 2025-01-01 00:00:00
end: 2025-04-01 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"DOGE_USDT"}]
*/
//@version=6
strategy("EMA + RSI + MACD Strategy", overlay=true)
// Input for EMA Lengths
emaFastLength = input(9, title="Fast EMA Length")
emaSlowLength = input(21, title="Slow EMA Length")
// RSI Settings
rsiLength = input(14, title="RSI Length")
rsiOverbought = input(70, title="RSI Overbought Level")
rsiOversold = input(30, title="RSI Oversold Level")
// MACD Settings
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
// Calculate EMAs
emaFast = ta.ema(close, emaFastLength)
emaSlow = ta.ema(close, emaSlowLength)
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Plot EMAs
plot(emaFast, title="Fast EMA", color=color.blue, linewidth=1)
plot(emaSlow, title="Slow EMA", color=color.red, linewidth=1)
// Buy and Sell Conditions
bullishCrossover = ta.crossover(emaFast, emaSlow) and rsi > 50 and macdLine > signalLine
bearishCrossover = ta.crossunder(emaFast, emaSlow) and rsi < 50 and macdLine < signalLine
// Plot Buy and Sell Signals
plotshape(series=bullishCrossover, title="BuySignal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, text="BUY")
plotshape(series=bearishCrossover, title="SellSignal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, text="SELL")
// Strategy Execution
if bullishCrossover
strategy.entry("Buy", strategy.long)
if bearishCrossover
strategy.close("Buy")
strategy.entry("Sell", strategy.short)