ScalpEA v2 preview
- Experts
- Martin Vrlik
- Version: 2.650
- Mise à jour: 8 mai 2026
Hi, I would like to show you limited version of my EA which I am selling here in full version.
But this system might have less features but is still working well, again, try it on demo first!
Difference between full and preview is almost only in machine learning part. If you have any question visit my channel.
How does it work?:
- EA waits until there are 3 candles (H1) after each other and between (candle 1 top wick) and (candle 3 bottom wick) is gap
- After that EA places pending order below candle 3 bottom wick and waits if market returns to the gap.
- Thats all it does.
Some additonal info about full version and configs here
Channel where to discuss and share your ideas
Graph at the screensots is from backtest with default settings on XAUUSD.
Backtest it and test it on demo first, this version does not have all the protection that full version does. Simply test it first, no profit is guaranteed!
FYI, I am using full version on VT Markets, Vantage and Purple trading.
Also make sure to enable Algoritmic trading in your Metatrader settings or it will not weork! (Tools - Options - Expert advisors)
You can find full ScalpEA v2 here: https://www.mql5.com/en/market/product/167553
AI generated description:
ScalpEA V2 Preview — FVG Scalping Expert Advisor
AI generated description:
FVG Scalping Expert Advisor for MetaTrader 5
Version 2.650 | © Martin Vrlik 2026
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERVIEW
────────
ScalpEA v2 is an automated Expert Advisor for MetaTrader 5 that detects and trades Fair Value Gap (FVG) zones. A Fair Value Gap is a price inefficiency that forms when three consecutive candles leave an uncovered gap between the high of the first candle and the low of the third candle (bullish FVG), or vice versa (bearish FVG). The EA places pending limit or stop orders at these zones and manages them through a complete set of filters, safety checks and risk controls.
The EA is primarily designed for XAUUSD (Gold) but works on any instrument and timeframe combination supported by MetaTrader 5.
HOW IT WORKS
────────────
On every new bar of the detection timeframe (sourceTF), the EA scans recent price history for valid FVG zones and stores them in an internal cache. On every new bar of the placement timeframe (placementTF), it reads that cache, applies all active filters, and places pending orders for zones that pass every check. The two timeframes can be set independently, allowing combinations such as detecting FVGs on H1 while evaluating placement conditions on M30.
Before placing any order the EA runs the following checks in sequence: duplicate detection (no two orders for the same FVG zone), candle direction filters, EMA trend filter, gap size filters, distance from current price, zone age, spread limit, margin and volume validation, and STOPS_LEVEL compliance. Only zones that pass all active filters receive a pending order.
If an order placement fails because the market is closed (for example at session open), the EA saves the order to a retry queue and attempts to place it again every tick for up to five minutes.
SIGNAL FILTERS
──────────────
Third candle confirmation — the candle that closes the FVG gap must move in the direction of the signal: green (close > open) for bullish FVG, red for bearish FVG.
All-three-candles confirmation — all three candles forming the FVG must be the same color. This is a stricter version of the above filter and ensures the FVG is backed by a consistent directional impulse rather than a mixed sequence.
Middle candle wick check — the wick of the middle candle (the one between the two gap candles) is inspected. If its counter-directional wick is more than wickMultiplier times longer than its directional wick, the signal is rejected. This filters out candles with strong rejection shadows that suggest weak momentum.
EMA(200) trend filter — before placing any pending order, the EA checks whether the last N closed H1 candles all lie entirely above (for BUY) or entirely below (for SELL) the 200-period Exponential Moving Average on the H1 chart. For a BUY order to be allowed, the Low of every one of those candles must be greater than the EMA value at that bar. For a SELL order, the High of every candle must be below the EMA. This filter always uses the H1 timeframe regardless of the sourceTF and placementTF settings. If not enough historical data is available at EA startup, the filter is skipped for that bar to prevent false blocking.
SELL-specific gap filters — SELL signals require a larger minimum gap size than BUY signals (controlled by a multiplier), and optionally a maximum gap size cap to avoid trading exhaustion moves.
PENDING ORDER MANAGEMENT
────────────────────────
The EA enforces a configurable maximum number of pending orders per direction (BUY and SELL are counted separately). When the FIFO system is enabled and the limit is reached, the oldest pending order is automatically removed to make room for the newest FVG signal. When FIFO is disabled, new signals are skipped until an existing pending order is filled or expires.
Pending orders are automatically removed when the FVG zone that generated them reaches its maximum age (maxFVGDurationMinutes). The age is measured from the time the FVG zone was formed, not from the time the order was placed.
RISK AND MONEY MANAGEMENT
──────────────────────────
The EA supports two lot sizing modes. In fixed mode, every trade uses the same lot size defined by the lotSize parameter. In dynamic mode, the lot size is calculated automatically for each trade based on the account balance, the configured risk percentage per trade, and the Stop Loss distance, ensuring that each trade risks no more than the specified percentage of the account balance.
SELL trades support independent TP, SL, risk percentage and pending order limit settings, because gold tends to behave differently during price drops versus rallies.
Every order is validated before sending: free margin is checked against the required margin, volume is verified against the symbol's minimum, maximum and step values, the number of pending orders is checked against the broker's account limit, and SL/TP distances are verified against the symbol's STOPS_LEVEL.
VISUALIZATION
─────────────
Active FVG zones are drawn as colored rectangles directly on the chart. Bullish zones use one color and bearish zones another, both fully configurable. Transparency, maximum number of visible zones and optional size labels can all be adjusted. Zones are automatically removed from the chart when they expire.
A dashboard panel in the top-left corner of the chart shows current account balance, equity, floating P/L, total EA profit since the start, number of closed trades, win rate, and the current number of pending orders per direction.
INPUT PARAMETERS
────────────────
Basic Settings
allowLong — enables BUY pending orders from bullish FVG zones. When set to false, no BUY orders are placed regardless of detected signals.
allowShort — enables SELL pending orders from bearish FVG zones. When set to false, no SELL orders are placed.
magicNumber — unique identifier assigned to all orders and positions opened by this EA. Change this value if you run multiple EAs on the same account to avoid conflicts.
configName — a text label displayed in the on-chart dashboard. Useful for identifying different parameter sets during optimization or testing.
tradeComment — comment string attached to every order and visible in the MT5 trade history.
sourceTF — the timeframe on which FVG zones are detected. The EA scans candle history on this timeframe to find valid gaps. Recommended values are H1 or H4.
placementTF — the timeframe that controls when pending orders are evaluated and placed. A new evaluation runs only at the open of each new bar on this timeframe. Must be equal to or smaller than sourceTF.
Money Management
lotSize — fixed lot size used for every trade when dynamic lot sizing is disabled.
useDynamicLotSizing — when true, the lot size is calculated automatically based on account balance, risk percentage and Stop Loss distance. When false, the fixed lotSize value is used.
riskPerTradePercent — maximum risk per trade expressed as a percentage of account balance. Active only when useDynamicLotSizing is true.
FVG Detection
maxFVGPerSide — maximum number of pending orders allowed simultaneously in one direction. BUY and SELL are counted separately.
minGapPoints_global — minimum FVG gap size in points. Gaps smaller than this value are ignored as noise. For XAUUSD, 30 points equals 3 pips.
maxFVGDurationMinutes — maximum age of an FVG zone in minutes, measured from the time the zone was formed. Zones older than this are removed from the cache and any pending orders generated by them are cancelled.
maxFVGDetectionWindow — how far back in history (in minutes) the EA searches for FVG zones during each detection pass.
entryOffsetPoints — offset added to the FVG boundary to set the entry price. For BUY orders: entry = FVG top + offset. For SELL orders: entry = FVG bottom - offset.
requireThirdCandleConfirmation — when true, the candle that closes the FVG must be in the direction of the signal (green for bullish, red for bearish).
requireAllThreeCandlesConfirmation — when true, all three candles forming the FVG must be the same color. Provides stronger directional confirmation than the single-candle check above.
enableMiddleWickCheck — when true, the EA inspects the wick of the middle candle of the FVG formation and rejects signals where the counter-directional wick is disproportionately large.
wickMultiplier — the maximum allowed ratio of the counter-directional wick to the directional wick of the middle candle. A value of 2.0 means the counter-directional wick may be at most twice as long as the directional wick.
useFIFOPendingSystem — when true and the pending order limit is reached, the oldest pending order is removed to make room for the new signal. When false, new signals are skipped while the limit is full.
Take Profit and Stop Loss
takeProfitType — selects the TP mode. In this version only TP_FIXED (fixed take profit) is available.
takeProfitPips — distance from entry price to Take Profit in points. For XAUUSD: 500 points = 50 pips.
stopLossPips — distance from entry price to Stop Loss in points for BUY trades. The default is intentionally high and acts as a safety net; primary exits rely on the Take Profit.
SELL Trade Settings
useSellSpecificSettings — when true, SELL trades use the parameters defined in this group instead of the global BUY parameters. Recommended for XAUUSD due to asymmetric volatility between upward and downward moves.
sellTakeProfitPips — Take Profit distance for SELL trades in points, independent of takeProfitPips.
sellStopLossPips — Stop Loss distance for SELL trades in points.
sellRiskPercentOverride — overrides the risk percentage for SELL trades when dynamic lot sizing is active. Set to 0.0 to use the global riskPerTradePercent.
sellMaxPendingsOverride — overrides the maximum number of SELL pending orders. Set to 0 to use the global maxFVGPerSide.
SELL FVG Filters
sellRequireBiggerGap — when true, SELL signals require a larger minimum gap than BUY signals, multiplied by sellGapMultiplier.
sellGapMultiplier — multiplier applied to minGapPoints_global to calculate the effective minimum gap for SELL signals. Ignored when sellMinGapPointsFixed is greater than zero.
sellMaxGapPoints — maximum allowed SELL FVG size in points. Gaps larger than this are rejected as potential exhaustion moves. Set to 0 to disable this cap.
sellMinGapPointsFixed — fixed minimum gap size for SELL signals in points. When greater than zero, this value is used directly and sellGapMultiplier is ignored.
Safety Limits
maxSpreadPoints — maximum allowed spread in points. When the current spread exceeds this value, no new pending orders are placed. Position management (trailing, cleanup) continues regardless of spread.
maxDistanceFromPrice — maximum allowed distance between the pending order entry price and the current market price, in points. FVG zones whose entry price is too far from the current price are skipped.
countOpenPositionsInLimit — when true, open positions are counted together with pending orders toward the maxFVGPerSide limit. When false, only pending orders are counted.
EMA Trend Filter
enableEMATrendFilter — enables the EMA(200) trend filter. When active, a pending order is placed only if the last N closed H1 candles all lie entirely on the correct side of the 200-period EMA. BUY orders require all candles above EMA (Low > EMA), SELL orders require all candles below EMA (High < EMA). The filter always uses H1 regardless of sourceTF and placementTF.
emaTrendCandleCount — number of recently closed H1 candles that must satisfy the EMA condition. Higher values produce a stricter trend requirement. A value of 10 means all ten of the last closed H1 candles must fully clear the EMA line.
Visual Settings
showFVGOnChart — draws active FVG zones as filled rectangles on the chart.
bullFVGColor — fill color for bullish (BUY) FVG rectangles.
bearFVGColor — fill color for bearish (SELL) FVG rectangles.
fvgTransparency — transparency of the FVG rectangle fill. Range 0 (opaque) to 255 (fully transparent). A value of 90 produces a light, non-intrusive tint.
showOnlyActiveFVG — when true, only FVG zones relevant to the current allowLong/allowShort configuration are displayed. When false, all detected zones are shown regardless of trade direction settings.
maxFVGToShow — maximum number of FVG rectangles drawn on the chart per direction. Limits visual clutter when many zones are detected.
showFVGLabels — when true, a text label showing the gap size in points is displayed at the center of each FVG rectangle.
Debug and Testing
debug — enables verbose logging to the MT5 Journal tab. Outputs detailed information about FVG detection, filter decisions, lot calculations, EMA trend checks, SL/TP modifications, and order management. Disable in live trading to reduce log volume.

L'utilisateur n'a laissé aucun commentaire sur la note