Divergence Fractals PRO PRT
- Experten
- Irina Cherkashina
- Version: 2.5
- Aktualisiert: 25 Januar 2026
- Aktivierungen: 5
The EA allows you to choose how price extremes (pivots) are detected for divergence analysis.
Fractals Simple (default) uses a fast, confirmed local extremum logic with one bar on each side. It does not repaint, produces signals earlier, and reflects the original trading logic of the EA. This mode is well balanced for active trading and was used in the initial versions of the strategy.
Pivot-N (Left/Right confirmation) is a more conservative option. A pivot is confirmed only when the price is higher/lower than N bars on both sides. Increasing N reduces noise and false signals but also decreases signal frequency and introduces additional confirmation delay. This mode is recommended for traders who prefer fewer but more reliable divergence setups.
This Expert Advisor is a multi-symbol, divergence-based trading system designed to run simultaneously on 28 FX pairs.
FOR MULTI-SYMBOL TRADING, MAKE THIS FUNCTION FALSE = MarketSafeMode = true; // Market-safe mode.
It combines:
-
Oscillator divergence detection (Classic and/or Hidden)
-
Pivot/turning-point engines (Fractals / alternative pivots depending on the build)
-
Optional multi-oscillator confirmation (AUX filters)
-
ATR channel context (median + upper/lower branches)
-
Flexible grid / averaging add-orders (configurable)
-
Advanced time/session control, including pre-session close actions (e.g., closing profitable baskets before end of day)
Core entry logic
1) Divergence signal (main engine)
The EA searches for divergence between price and a selected main oscillator, with independent control of:
-
Classic divergence
-
Hidden divergence
-
Direction: BUY / SELL / BOTH
-
“Same direction” re-entries (optional)
Signal formation uses pivot points (depending on settings/version):
-
Fractals (simple or Bill Williams)
-
or N-bar pivots (smoother, less noise; not repaint)
2) Optional “Zero-Cross / Center” behavior
If enabled, the EA can require the oscillator to behave relative to a center level (“horizon”):
-
0 for MACD/AO/AC-type oscillators
-
50 for RSI/Stochastic-type oscillators
This can be used as a filter and/or as an additional timing rule depending on mode.
Advanced Divergence Oscillator Position Filter (NEW)
This is an optional filter that restricts divergence entries depending on where the oscillator is located relative to its center and/or zones.
Master switch (default OFF)
-
InpUseOscPosFilter = false by default
When OFF, the EA works exactly as before.
Modes
-
OFF – no restriction
-
ZERO_LINE –
BUY allowed only if oscillator is below the center; SELL only above the center -
ZONES –
BUY allowed only if oscillator is in the “lower zone” (<= BuyZone);
SELL allowed only if oscillator is in the “upper zone” (>= SellZone) -
AFTER_CROSS –
allows entries only if a center cross happened recently (lookback bars)
Center and zones
-
InpOscAutoCenter can auto-set center (0 or 50 depending on oscillator type), or you can define:
-
InpOscCenterLevel
-
InpBuyZoneLevel / InpSellZoneLevel (for ZONES mode)
This provides “professional” control over divergence quality: more trades (ZERO_LINE) vs more selective trades (ZONES).
AUX confirmation filters (optional)
The EA can use 1–2 additional oscillators as confirmation filters (AUX).
Typical usage:
-
ALL confirmation (stricter, fewer trades)
-
ANY confirmation (looser, more trades)
-
Lookback bars for confirmation window
This lets you build profiles like:
-
RSI divergence + MACD confirmation
-
CCI divergence + RSI/MACD confirmation
ATR Channel context (monitoring + filters)
The EA uses an ATR-based channel model:
-
Median = MA (LWMA of Typical price by default in the build)
-
Upper/Lower = Median ± ATR × Multiplier
This channel can be used as:
-
market context filter (where price is relative to channel)
-
exit/close assistance
-
monitoring overlay (optional indicator can display this channel)
Money management / grid add-orders
Depending on configuration, the EA can:
-
trade single entries, or
-
add averaging orders (grid / “better price” logic)
-
use a controlled multiplier (martingale-like) if enabled
Key controls typically include:
-
initial lot / fixed lot
-
multiplier
-
minimum distance between entries (in points/pips units)
-
max number of orders per direction
Exit logic / closing
The EA supports:
-
single order closes
-
group/basket closes (net profit logic depending on mode)
-
session-end actions (see below)
Trading Sessions & End-of-Day profit handling (UPDATED)
The EA includes session scheduling:
-
UseTradingSessions
-
Session1Start / Session1End
-
Session2Start / Session2End
Session close modes
-
NONE – do nothing at session end
-
CLOSE_ANY – close everything
-
CLOSE_IF_PROFIT – close only individually profitable orders
-
CLOSE_NET_PROFIT_SETS (NEW) – close entire sets/baskets (Symbol+Magic) if that basket’s net profit > 0
-
CLOSE_ALL_IF_TOTAL_MINPROFIT (NEW) – close all EA orders if overall result reaches a target (see MinProfit measures)
MinProfit Measure (NEW)
For the “close all if total min profit” logic, the EA supports:
-
MONEY
-
PIPS_RAW (pure price distance pips)
-
PIPS_MONEY_EQUIV (recommended)
“Money-equivalent pips”: total profit + swap + commission converted to pips using pip value and lot sizing.
This prevents false closes when price pips look positive but real net money is not.
Notes for users
-
For multi-symbol portfolios and varying spreads/commissions, prefer:
-
session close by net baskets, and/or
-
MinProfit using PIPS_MONEY_EQUIV or MONEY
-
-
Always test on a demo/cent environment with your broker’s symbols and spreads.
-
Adjust SessionEnd to your broker’s daily rollover time if needed.
