この戦略は,1時間のチャート上のトレンド偏差,15分チャート上のMACD指標のクロスシグナル,そして5分チャート上の急速な波動率とギャップに基づいてエントリーポイントを決定します.この戦略は,異なる時間周期で複数の指標を使用することにより,市場の長期の傾向,中期の動き,短期の変動を捉え,より正確な市場予測を実現することを目的としています.
この戦略の核心原則は,異なる時間周期の技術指標を組み合わせて,市場をより全面的に分析することです.具体的には:
この3つの異なる時間周期のシグナルを組み合わせることで,戦略は市場の全体的な動きをよりよく把握し,短期的な波動を利用してエントリーポイントを最適化することで,取引の正確性と収益性の可能性を高めます.
この戦略は,1時間チャートのトレンド偏差,15分チャートのMACD動向信号,および5分チャートの急速な波動率と価格ギャップを組み合わせて,複数の時間周期,複数の指標の取引システムを構築しています.この方法は,市場をより全面的に分析し,さまざまなレベルのトレンドと機会を捉え,リスクを制御することができます.しかし,戦略のパフォーマンスは,パラメータ選択に敏感であり,特定の市場の激しい波動で課題に直面することがあります.
/*backtest
start: 2023-05-05 00:00:00
end: 2024-05-10 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("H1 Bias + M15 MSS + M5 FVG", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// H1 Bias
h1_bias = request.security(syminfo.tickerid, "60", close)
h1_ma = ta.sma(h1_bias, 50)
// M15 MSS
[m15_macd_line, m15_macd_signal, _] = ta.macd(request.security(syminfo.tickerid, "15", close), 12, 26, 9)
// M5 FVG Entry
m5_volatility = ta.atr(14)
// Entry conditions for long and short positions
long_condition = m15_macd_line > m15_macd_signal and m5_volatility > 0.001
short_condition = m15_macd_line < m15_macd_signal and m5_volatility > 0.001
// Exit conditions
exit_long_condition = m15_macd_line < m15_macd_signal
exit_short_condition = m15_macd_line > m15_macd_signal
// Strategy
if (long_condition)
strategy.entry("Long", strategy.long)
if (short_condition)
strategy.entry("Short", strategy.short)
if (exit_long_condition)
strategy.close("Long")
if (exit_short_condition)
strategy.close("Short")
// Take-Profit and Stop-Loss settings considering leverage
leverage = 10.0 // Leverage as a float
tp_percentage = 15.0 // TP percentage without leverage as a float
sl_percentage = 5.0 // SL percentage without leverage as a float
tp_level = strategy.position_avg_price * (1.0 + (tp_percentage / 100.0 / leverage)) // TP considering leverage as a float
sl_level = strategy.position_avg_price * (1.0 - (sl_percentage / 100.0 / leverage)) // SL considering leverage as a float
strategy.exit("TP/SL", "Long", limit=tp_level, stop=sl_level)
strategy.exit("TP/SL", "Short", limit=tp_level, stop=sl_level)
// Plotting
plot(h1_ma, color=color.blue, linewidth=2)
plotshape(long_condition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(short_condition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)