
これは,ダイナミックなリスク管理と固定利益目標を組み合わせた,公正価値ギャップ (FVG) に基づく取引戦略である.この戦略は15分間の周期で動作し,市場内の価格ギャップを特定して潜在的な取引機会を捉える.2023年11月から2024年8月までの回顧データによると,この戦略は,284.40%の純利益率を達成し,合計153件の取引を完了し,その中では71.24%の利益率と2.422の利益因子を達成した.
戦略の核心は,連続した3つのK線間の価格関係を監視することによって,公正価値のギャップを識別することです.具体的には:
この戦略は,公正価値ギャップ理論と科学的リスク管理方法の組み合わせにより,良好な取引効果を示している.戦略の高利率と安定した収益因子は,実際の戦いの価値を示している.推奨された最適化の方向によって,戦略はさらに向上する余地がある.トレーダーは,実用化する前に充分なパラメータ最適化と裏付けを推奨している.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-28 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Fair Value Gap Strategy with % SL and Fixed TP", overlay=true, initial_capital=500, default_qty_type=strategy.fixed, default_qty_value=1)
// Parameters
fvgThreshold = input.float(0.5, "FVG Threshold (%)", minval=0.1, step=0.1)
// Fixed take profit in pips
takeProfitPips = 50
// Function to convert pips to price
pipsToPriceChange(pips) =>
syminfo.mintick * pips * 10
// Function to detect Fair Value Gap
detectFVG(dir) =>
gap = 0.0
if dir > 0 // Bullish FVG
gap := low[2] - high[1]
else // Bearish FVG
gap := low[1] - high[2]
math.abs(gap) > (close * fvgThreshold / 100)
// Detect FVGs
bullishFVG = detectFVG(1)
bearishFVG = detectFVG(-1)
// Entry conditions
longCondition = bullishFVG
shortCondition = bearishFVG
// Calculate take profit level
longTakeProfit = strategy.position_avg_price + pipsToPriceChange(takeProfitPips)
shortTakeProfit = strategy.position_avg_price - pipsToPriceChange(takeProfitPips)
// Calculate stop loss amount (5% of capital)
stopLossAmount = strategy.equity * 0.01
// Execute trades
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Set exit conditions
if (strategy.position_size > 0)
strategy.exit("Long TP", "Long", limit=longTakeProfit)
strategy.close("Long SL", when=strategy.openprofit < -stopLossAmount)
else if (strategy.position_size < 0)
strategy.exit("Short TP", "Short", limit=shortTakeProfit)
strategy.close("Short SL", when=strategy.openprofit < -stopLossAmount)
// Plot signals
plotshape(longCondition, "Buy Signal", location = location.belowbar, color = color.green, style = shape.triangleup, size = size.small)
plotshape(shortCondition, "Sell Signal", location = location.abovebar, color = color.red, style = shape.triangledown, size = size.small)