고급 FVG 갭 전략 Pro+

FVG MTF IIR Trend RISK
생성 날짜: 2025-09-01 18:05:50 마지막으로 수정됨: 2025-09-01 18:05:50
복사: 0 클릭수: 274
avatar of ianzeng123 ianzeng123
2
집중하다
319
수행원

고급 FVG 갭 전략 Pro+ 고급 FVG 갭 전략 Pro+

, 이 전략이 얼마나 강력한가?

아시다시피, 시장의 90%의 거래자들은 하락을 쫓고 있지만, 진짜 상인들은 “가격 허공지구”를 찾고 있습니다! Advanced FVG Strategy Pro+는 이런 신비한 허공을 잡기 위한 슈퍼 무기입니다.

공정 가치 격차 (FVG) 는 간단히 말해, 물가격이 뛰어올랐을 때 남겨진 ‘공백지구’입니다. 마치 물덩어리를 걸어서 지나갔을 때 다시 돌아와 ‘물덩어리를 채워야’ 하는 것과 같습니다.

세 가지 핵심 블랙 테크놀로지

1. 다중 시간 프레임 분석 이제 한 번의 회로로 제한되지 않습니다! 전략은 5 분 차트에서 수행 할 수 있지만 1 시간 동안 FVG 신호를 사용하면 망원경으로 먼 산을 보는 것과 같습니다.

2. IIR 트렌드 필터
이것은 일반적인 이동 평균이 아닙니다. 엔지니어링 IIR 낮은 관통 필터를 사용하여 트렌드 방향을 정확하게 파악합니다. 트렌드 레이더가 거래에 장착되어 바람이 불면만 공격하는 것을 상상해보십시오!

3. 지능형 위험 관리 % 및 고정 금액의 위험 모드를 지원하고, 폭발 방지 저장소 보호 장치가 있습니다. 운전하는 것과 같은 안전벨트와 공기 봉투의 쌍방향 보호로 귀하의 계좌를 더욱 안전하게 보호합니다!

실전 응용 시나리오

이런 상황에서는 가장 적합합니다.

  • 위기 상황 속에서 을 찾는 기회
  • 트렌드 상황에서의 회귀 진입점
  • 중요한 지지 저항점 근처의 정밀 사격

갱도 피하기 위한 지침:

  • 중요한 소식이 있을 때 사용 중지
  • 유동성이 극히 낮은 소액화폐는 조심해야 합니다.
  • 시장의 변동에 따라 리스크 변수를 조정하는 것을 기억하십시오.

: 왜 이런 전략을 택했나요?

전통적인 전략은 너무 적은 신호로 기회를 놓치거나, 너무 많은 신호로 가짜 돌파구를 뚫었다.

그리고 가장 친절한 것은 모든 매개 변수들이 조정될 수 있다는 점입니다. 마치 튜너가 조정하는 것처럼, 당신은 시장의 상황에 따라 가장 적합한 거래 리듬을 “조율”할 수 있습니다.

기억하세요: 좋은 전략은 매일 거래하는 것이 아니라, 당신이 가장 확신할 때 거래하는 것입니다! 이것이 FVG 전략의 매력입니다.

전략 소스 코드
/*backtest
start: 2024-09-01 00:00:00
end: 2025-08-31 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=6
strategy("Advanced FVG Strategy Pro+ (v6)", overlay=true,
  initial_capital=10000,
  default_qty_type=strategy.fixed,
  default_qty_value=1,
  commission_type=strategy.commission.percent,
  commission_value=0.05,
  calc_on_every_tick=true,
  process_orders_on_close=true)

// ---------------- Inputs ----------------
fvg_tf        = input.timeframe("", "FVG Timeframe (MTF)")
bodySens      = input.float(1.0, "FVG Body Sensitivity", step=0.1, minval=0.0)
mitigate_mid  = input.bool(true, "Mitigation on Midpoint")
rr_ratio      = input.float(2.0, "Risk/Reward Ratio", step=0.1)

risk_mode     = input.string("Percent", "Risk Mode", options=["Percent","Fixed $"])
risk_perc     = input.float(1.0, "Risk % (of Equity)", minval=0.1, maxval=10.0)
risk_fixed    = input.float(100.0, "Fixed $ Risk", minval=1.0)

useTrend      = input.bool(true, "Filter with FVG Trend")
rp            = input.float(10.0, "Trend Filter Ripple (dB)", minval=0.1, step=0.1)
fc            = input.float(0.1, "Trend Filter Cutoff (0..0.5)", minval=0.01, maxval=0.5, step=0.01)

extendLength  = input.int(10, "Extend Boxes (bars)", minval=0)

// ---------------- MTF candles ----------------
c1 = fvg_tf == "" ? close : request.security(syminfo.tickerid, fvg_tf, close,  lookahead = barmerge.lookahead_on)
o1 = fvg_tf == "" ? open  : request.security(syminfo.tickerid, fvg_tf, open,   lookahead = barmerge.lookahead_on)
h1 = fvg_tf == "" ? high  : request.security(syminfo.tickerid, fvg_tf, high,   lookahead = barmerge.lookahead_on)
l1 = fvg_tf == "" ? low   : request.security(syminfo.tickerid, fvg_tf, low,    lookahead = barmerge.lookahead_on)
h2 = fvg_tf == "" ? high[2] : request.security(syminfo.tickerid, fvg_tf, high[2], lookahead = barmerge.lookahead_on)
l2 = fvg_tf == "" ? low[2]  : request.security(syminfo.tickerid, fvg_tf, low[2],  lookahead = barmerge.lookahead_on)

// ---------------- FVG detection ----------------
float wick = math.abs(c1 - o1)
float avg_body = ta.sma(wick, 50)

bool bullFVG = (l1 > h2) and (c1 > h2) and (wick >= avg_body * bodySens)
bool bearFVG = (h1 < l2) and (c1 < l2) and (wick >= avg_body * bodySens)

// ---------------- Trend Filter (IIR low-pass) ----------------
float src = (h1 + l1) / 2.0
float epsilon = math.sqrt(math.pow(10.0, rp/10.0) - 1.0)
float d = math.sqrt(1.0 + epsilon * epsilon)
float c  = 1.0 / math.tan(math.pi * fc)
float norm = 1.0 / (1.0 + d * c + c * c)
float b0 = norm
float b1 = 2.0 * norm
float b2 = norm
float a1 = 2.0 * norm * (1.0 - c * c)
float a2 = norm * (1.0 - d * c + c * c)

var float trend = na
var float trend1 = na
var float trend2 = na
trend := bar_index < 2 ? src : (b0 * src + b1 * src[1] + b2 * src[2] - a1 * nz(trend1) - a2 * nz(trend2))
trend2 := trend1
trend1 := trend

bool trendUp   = trend > nz(trend[1])
bool trendDown = trend < nz(trend[1])

// ---------------- Strategy Conditions ----------------
bool longCond  = bullFVG and (not useTrend or trendUp)
bool shortCond = bearFVG and (not useTrend or trendDown)

// stop loss / take profit (based on MTF gap edges)
float longSL  = l1
float shortSL = h1
float longRisk = close - longSL
float shortRisk = shortSL - close
float longTP  = close + (close - longSL) * rr_ratio
float shortTP = close - (shortSL - close) * rr_ratio

// ---------------- Position sizing ----------------
float equity = strategy.equity
float riskCash = risk_mode == "Percent" ? (equity * risk_perc / 100.0) : risk_fixed
float longQty  = (longRisk > 0.0) ? (riskCash / longRisk) : na
float shortQty = (shortRisk > 0.0) ? (riskCash / shortRisk) : na

// safety cap: avoid ridiculously large position sizes (simple protective cap)
float maxQty = math.max(1.0, (equity / math.max(1e-8, close)) * 0.25)  // cap ~25% equity worth of base asset
if not na(longQty)
    longQty := math.min(longQty, maxQty)
if not na(shortQty)
    shortQty := math.min(shortQty, maxQty)

// small extra guard (do not trade if qty becomes extremely small or NaN)
bool canLong  = longCond and not na(longQty) and (longQty > 0.0)
bool canShort = shortCond and not na(shortQty) and (shortQty > 0.0)

// ---------------- Orders ----------------
if canLong
    strategy.entry("Long", strategy.long, qty = longQty)
    strategy.exit("Long TP/SL", "Long", stop = longSL, limit = longTP)

if canShort
    strategy.entry("Short", strategy.short, qty = shortQty)
    strategy.exit("Short TP/SL", "Short", stop = shortSL, limit = shortTP)

// ---------------- Visuals ----------------
plotshape(longCond, title="Bull FVG", color=color.new(color.green, 0), style=shape.triangleup, location=location.belowbar, size=size.small)
plotshape(shortCond, title="Bear FVG", color=color.new(color.red, 0), style=shape.triangledown, location=location.abovebar, size=size.small)
plot(useTrend ? trend : na, title="FVG Trend", color=trendUp ? color.lime : trendDown ? color.red : color.gray, linewidth=2)