
この戦略は,動量指標と資金流動指標を組み合わせた総合的な取引システムであり,トリプル指数移動平均 ((EMA)) に対する動量指標の平滑処理により,市場騒音を効果的に軽減する.戦略は,変化率 ((ROC)) を使って原動量計算し,通貨流動指標 ((MFI)) と組み合わせて取引シグナルを確認する.様々な時間周期の取引に適用できる.
戦略の核心原則は,動量指標と資金流動指標 (MFI) という2つの主要な技術指標に基づいています.まずはROCを使用して原動力を計算し,その後,トリプルEMA平滑処理によりより安定した動量信号ラインを得ます.取引信号の生成は,動量とMFIの条件を同時に満たす必要があります.平滑後の動量が正でMFIが中位レベルより高い場合,多信号が生成され,平滑後の動量が負でMFIが中位レベルより低い場合,空信号が生成されます.戦略はまた,動量とMFIのターニングポイントに基づいて退出メカニズムを設計し,時効性のあるストップ損失と利益のロックに役立ちます.
これは,合理的で論理的に明確な設計された総合的な取引戦略である.動量と資金流動指標の組み合わせと三重EMAの平滑な処理により,信号のタイム性と信頼性を効果的にバランスさせる.戦略は,さらなる最適化と実用的なアプリケーションに適した強力な実用性と拡張性を持つ.トレーダーは,実際のアプリケーションでリスク管理に注意し,パラメータを合理的に設定し,市場の特定の状況に応じて最適化調整を行うことを推奨する.
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("Momentum & Money Flow Strategy with Triple EMA Smoothing", overlay=true, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Input parameters
momentumPeriod = input.int(7, title="Momentum Period", minval=1)
smoothingPeriod = input.int(3, title="Momentum Smoothing Period", minval=1)
mfiPeriod = input.int(14, title="MFI Period", minval=1)
mfiMiddleLevel = input.int(50, title="MFI Middle Level", minval=1, maxval=100)
mfiOverbought = input.int(80, title="MFI Overbought Level", minval=1, maxval=100)
mfiOversold = input.int(20, title="MFI Oversold Level", minval=1, maxval=100)
// Calculate raw momentum oscillator using rate-of-change (ROC)
rawMomentum = ta.roc(close, momentumPeriod)
// Apply triple EMA smoothing for a much smoother momentum line
smoothedMomentum = ta.ema(ta.ema(ta.ema(rawMomentum, smoothingPeriod), smoothingPeriod), smoothingPeriod)
// Calculate Money Flow Index (MFI) using the typical price (hlc3)
typicalPrice = hlc3
mfiValue = ta.mfi(typicalPrice, mfiPeriod)
// Define conditions for filtering signals based on smoothed momentum and MFI
longCondition = (smoothedMomentum > 0) and (mfiValue > mfiMiddleLevel)
shortCondition = (smoothedMomentum < 0) and (mfiValue < mfiMiddleLevel)
// Define exit conditions for capturing turning points
exitLongCondition = (smoothedMomentum < 0) and (mfiValue < mfiOversold)
exitShortCondition = (smoothedMomentum > 0) and (mfiValue > mfiOverbought)
// Execute entries based on defined conditions
if (longCondition and strategy.position_size <= 0)
strategy.entry("Long", strategy.long)
if (shortCondition and strategy.position_size >= 0)
strategy.entry("Short", strategy.short)
// Exit positions based on turning point conditions
if (strategy.position_size > 0 and exitLongCondition)
strategy.close("Long")
if (strategy.position_size < 0 and exitShortCondition)
strategy.close("Short")
// Plot the triple EMA smoothed momentum oscillator and MFI for visual reference
plot(smoothedMomentum, title="Smoothed Momentum (Triple EMA ROC)", color=color.blue)
hline(0, color=color.gray)
plot(mfiValue, title="Money Flow Index (MFI)", color=color.orange)
hline(mfiMiddleLevel, color=color.green, linestyle=hline.style_dotted, title="MFI Middle Level")