
この戦略は,技術分析に基づいたトレンド追跡システムであり,主に50周期指数移動平均 ((EMA) と200周期簡易移動平均 ((MA) の交差信号を使用して市場のトレンドを捕捉する.戦略は,ダイナミックなストップ・ストップ・損失機構を統合し,予め設定されたストップ・損失とストップ・ポイントを介してリスクを制御し,収益をロックします.この組み合わせは,戦略が大きなトレンドを把握し,状況が逆転するときに間に合わせた損失を止めるようにします.
戦略の核心的な論理は,2つの均線の交差判断に基づいています:50周期EMAが上向きに200周期MAを渡るとき,システムは多信号を生成し;50周期EMAが下向きに200周期MAを渡るとき,システムは空白信号を生成します. ポジションを開けた後,システムは自動的にストロップ・ローズ・エントリー ((入場価格より3ポイント下) とストップ・ストップ・ポジション ((入場価格より7.5ポイント下)) を設定します. さらに,逆転信号が生じたとき,システムは自動的に現在のポジションを平準化して,ポジションの方向が市場動向と矛盾しないようにします.
この戦略は,古典的な双均線交差システムと動的止損止損機構を組み合わせて,完全なトレンド追跡取引システムを構築する.戦略の優点は,体系化度が高いこと,リスク管理が完善であることにあるが,実際の適用では,特定の市場環境と資金の規模に応じて最適化調整が必要である.より多くの技術指標を追加し,資金管理方法を改善することにより,戦略の安定性と収益性を向上させる余地もある.安定した収益を追求する投資家のための参考に値する基本的な戦略の枠組みである.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-24 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("200 MA & 50 EMA Crossover Strategy with **Estimated** SL & TP", overlay=true)
// Parameters for the 200 MA and 50 EMA
ma200 = ta.sma(close, 200) // 200-period simple moving average
ema50 = ta.ema(close, 50) // 50-period exponential moving average
// Plot the MA and EMA on the chart
plot(ma200, color=color.blue, linewidth=2, title="200 MA")
plot(ema50, color=color.red, linewidth=2, title="50 EMA")
// Define **estimated** stop loss and take profit values
// SL = 3 points, TP = 7.5 points from the entry price
sl_points = 3
tp_points = 7.5
// Buy signal: when the 50 EMA crosses above the 200 MA (bullish crossover)
if (ta.crossover(ema50, ma200))
strategy.entry("Buy", strategy.long)
// Set **estimated** stop loss and take profit strategy.exit("Take Profit/Stop Loss", "Buy", stop=strategy.position_avg_price - sl_points, limit=strategy.position_avg_price + tp_points)
// Sell signal: when the 50 EMA crosses below the 200 MA (bearish crossover)
if (ta.crossunder(ema50, ma200))
strategy.entry("Sell", strategy.short)
// Set **estimated** stop loss and take profit strategy.exit("Take Profit/Stop Loss", "Sell", stop=strategy.position_avg_price + sl_points, limit=strategy.position_avg_price - tp_points)
// Optional: Close the position when an opposite signal appears
if (strategy.position_size > 0 and ta.crossunder(ema50, ma200))
strategy.close("Buy")
if (strategy.position_size < 0 and ta.crossover(ema50, ma200))
strategy.close("Sell")