Erweiterte FVG-Gap-Strategie Pro+

FVG MTF IIR Trend RISK
Erstellungsdatum: 2025-09-01 18:05:50 zuletzt geändert: 2025-09-01 18:05:50
Kopie: 0 Klicks: 274
2
konzentrieren Sie sich auf
319
Anhänger

Erweiterte FVG-Gap-Strategie Pro+ Erweiterte FVG-Gap-Strategie Pro+

Wie stark ist diese Strategie?

Wusstest du das? 90% der Händler auf dem Markt sind auf der Suche nach einem Absturz, aber die echten Profis suchen nach einer “Preislücke”!

Die FVG (Fair Value Gap) ist einfach die “leere Zone”, die bei einem Preissprung zurückbleibt, so wie man über einen Wasserloch läuft und irgendwann wieder zurückkommt, um ihn zu füllen. Die Strategie besteht darin, sich zu den besten Zeiten an den Fischen zu verstecken, die am “Pit” liegen.

Die drei Kernbereiche der Schwarzen Technologie

1. Mehrfache Zeitrahmenanalyse Die Strategie kann auf einer 5-Minuten-Karte ausgeführt werden, aber mit einem FVG-Signal von 1 Stunde ist es wie mit einem Teleskop einen fernen Berg zu sehen, mit einem Vergrößerungsglas die Details zu sehen, die Sicht ist umfassender!

2. IIR-Trendfilter
Das ist kein gewöhnlicher Moving Average! Mit einem technischen IIR-Low-Trend-Filter kann man die Richtung des Trends genau erkennen. Stellen Sie sich vor, es ist wie ein “Trend-Radar” für Ihren Handel, der nur im Windschlag trifft!

3. Intelligentes Risikomanagement Es unterstützt zwei Risikomodelle: Prozentsatz und Festbetrag, und es bietet eine Explosionsschutz-Methode. Genau wie beim Fahren mit einem Sicherheitsgurt und einem Doppelschutz, macht es Ihr Konto noch sicherer!

Einsatz im Kampf

Das sind die Situationen, die am besten geeignet sind:

  • Ein Durchbruch in der Erschütterung
  • Ein Rückschlag in der Trendlage
  • Präzisionsscharfschützen in der Nähe von wichtigen Stützpunkten

Ein Leitfaden für die Vermeidung von Höhlen:

  • Das Internet wird vor wichtigen Nachrichten unterbrochen
  • Vorsicht bei kleineren Währungen mit schlechter Liquidität
  • Denken Sie daran, die Risikoparameter an die Marktschwankungen anzupassen.

Warum wählten Sie diese Strategie?

Traditionelle Strategien lassen entweder zu wenige Signale versäumen oder zu viele Signale werden durch falsche Durchbrüche verfehlt. Diese Strategie, die mehrere Filtermechanismen verwendet, führt zu einem präzisen Angriff von “Lieber fehlt die Flut!”

Und das Beste daran ist, dass alle Parameter individuell angepasst werden können, so dass Sie, wie ein Tonist, den richtigen Handelsrhythmus für verschiedene Marktumstände auswählen können.

Denken Sie daran: Eine gute Strategie ist nicht, dass Sie jeden Tag handeln, sondern dass Sie handeln, wenn Sie am sichersten sind!

Strategiequellcode
/*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)