
これは,双均線交差とトレンド追跡に基づく定量取引戦略である.この戦略は,主に47サイクルと95周期の指数移動平均 ((EMA)) を使って,均線交差シグナルによって取引を行う.この戦略は15分間の時間周期で動作し,技術分析と動量取引のコア心理を統合し,安定した取引収益を達成することを目的としています.
戦略の核心は,短期EMA ((47サイクル) と長期EMA ((95サイクル) の交差を利用してトレンドの変化を識別することである.短期EMAが上方から長期EMAを横切るとき,システムは多信号を生成し,短期EMAが下方から長期EMAを横切るとき,システムは平仓する.この設計は,価格動力とトレンド継続性の原理に基づいて,均線交差によってトレンド転換点を確認し,市場の主な動きを把握する.
これは,構造が明確で,論理が厳格なトレンド追跡戦略である.双均線交差によって市場トレンドを捕捉し,操作性と拡張性が優れている.一定の限界があるが,継続的な最適化と完善によって,安定した信頼性の高い取引システムに発展する見込みがある.異なる市場特性に合わせてパラメータを柔軟に調整し,完善したリスク制御機構を構築することに重点を置いている.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-27 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("EMA Crossover Strategy", overlay=true)
// Define the EMA periods
shortEmaPeriod = 47
longEmaPeriod = 95
// Calculate EMAs
ema11 = ta.ema(close, shortEmaPeriod)
ema21 = ta.ema(close, longEmaPeriod)
// Plot EMAs on the chart
plot(ema11, title="11 EMA", color=color.blue, linewidth=2)
plot(ema21, title="21 EMA", color=color.red, linewidth=2)
// Generate trading signals
longSignal = ta.crossover(ema11, ema21)
shortSignal = ta.crossunder(ema11, ema21)
// Execute trades based on signals
if (longSignal)
strategy.entry("Buy", strategy.long)
if (shortSignal)
strategy.close("Buy")
// Optional: Plot buy and sell signals on the chart
plotshape(series=longSignal, location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(series=shortSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")
// Plot buy/sell signals on the main chart
plotshape(series=longSignal, location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(series=shortSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")