
これは、指数移動平均 (EMA)、ボリューム確認、平均トレンド率 (ATR) インジケーターを組み合わせた高度な定量取引戦略です。この戦略は、複数のテクニカル指標を使用して市場動向を正確に把握するだけでなく、ボリューム確認を通じて取引の信頼性を向上させます。同時に、ATRを使用してストップロスとテイクプロフィットのポジションを動的に調整し、包括的なリスク管理システムを実現します。 。
戦略の中核となるロジックは、次の 3 つの主要な部分から構成されます。
この戦略は、複数のテクニカル指標を総合的に使用することで、論理的に厳密な取引システムを確立します。この戦略の主な利点は、複数の確認メカニズムと動的なリスク管理にありますが、トレンドの反転や誤ったボリュームの突破などのリスクにも注意する必要があります。この戦略は継続的な最適化と改善を通じて、実際の取引でより良いパフォーマンスを達成することが期待されます。
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-16 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy("Enhanced Volume + Trend Strategy", overlay=true)
// Inputs
emaLength = input.int(50, title="EMA Length")
atrLength = input.int(14, title="ATR Length")
atrMultiplierSL = input.float(2.0, title="ATR Multiplier for Stop Loss")
atrMultiplierTP = input.float(3.0, title="ATR Multiplier for Take Profit")
volLength = input.int(20, title="Volume Moving Average Length")
volMultiplier = input.float(1.5, title="Volume Multiplier (Relative to Previous Volume)")
// Trend Detection using EMA
ema = ta.ema(close, emaLength)
// ATR Calculation for Stop Loss/Take Profit
atr = ta.atr(atrLength)
// Volume Moving Average
volMA = ta.sma(volume, volLength)
// Additional Volume Condition (Current Volume > Previous Volume + Multiplier)
volCondition = volume > volMA * volMultiplier and volume > volume[1]
// Entry Conditions based on Trend (EMA) and Volume (Volume Moving Average)
longCondition = close > ema and volCondition
shortCondition = close < ema and volCondition
// Stop Loss and Take Profit Levels
longStopLoss = close - (atr * atrMultiplierSL)
longTakeProfit = close + (atr * atrMultiplierTP)
shortStopLoss = close + (atr * atrMultiplierSL)
shortTakeProfit = close - (atr * atrMultiplierTP)
// Strategy Execution
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", "Long", stop=longStopLoss, limit=longTakeProfit)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", "Short", stop=shortStopLoss, limit=shortTakeProfit)
// Plotting EMA
plot(ema, color=color.yellow, title="EMA")
// Plot Volume Moving Average
plot(volMA, color=color.blue, title="Volume Moving Average")
// Signal Visualizations
plotshape(series=longCondition, color=color.green, style=shape.labelup, location=location.belowbar, title="Buy Signal")
plotshape(series=shortCondition, color=color.red, style=shape.labeldown, location=location.abovebar, title="Sell Signal")