Market Open Scalper
- Experts
- AMS Trading
- 버전: 1.12
- 활성화: 5
Market Open Scalper Indices V1.1
================================
A disciplined session-open mean-reversion EA built specifically for INDICES
(US30, NAS100, SPX500, GER40, UK100, JP225) and STOCK CFDs. One signal per
symbol per day, strict broker-rule compliance, full Magic Number isolation.
Note: This product is NOT designed for FX pairs. Index and stock cash-session
opens behave differently from forex liquidity rotations, and the strategy's
defaults are tuned for that profile.
What the EA does
----------------
At the cash-session open (default 09:30 NYSE), Market Open Scalper anchors
on the first 15-minute candle — capturing its high and low. After that
candle closes, the EA places a single counter-trend limit order that
targets a Fibonacci retracement of the candle range:
- Bullish opening candle -> SELL LIMIT at the candle high, target Fib 61.8.
- Bearish opening candle -> BUY LIMIT at the candle low, target Fib 38.2.
Stop loss is automatically placed at 50% of the take-profit distance from
the entry, on the protective side. The pending order natively expires after
a configurable number of hours via ORDER_TIME_SPECIFIED.
How it works
------------
1. Compute the trading day in the user-defined logical timezone.
2. Anchor on the first M15 bar that opens at or after the configured cash
session open.
3. Wait for that bar to close, then validate it: body must exceed the doji
threshold and range must exceed a percentage of D1 ATR(14).
4. Draw a Fibonacci retracement on the chart, ALWAYS from high to low,
visible for the configured display window.
5. Place a single limit order with native broker expiration matching the
Fibonacci display window.
6. Mark the day complete the moment placement is attempted — whether the
attempt succeeds or fails — so a transient broker rejection cannot
trigger retry storms.
Why indices and stocks
----------------------
Cash-session opens on equity indices produce concentrated order-flow
imbalances during the first 15 minutes. These imbalances frequently
overshoot and partially retrace within the same session as auction
rebalancing settles. The 38.2% and 61.8% Fibonacci levels of the opening
candle are well-known liquidity zones that often act as natural targets
for those retracements. Limiting the EA to one setup per symbol per day
enforces statistical discipline and avoids overtrading the noise that
follows the open.
Stock CFDs work on the same principle when traded against their primary
exchange's open. Configure InpMarketOpenHour and InpTimezoneOffsetH to
match the stock's exchange; the strategy logic is symbol-agnostic.
Risk management
---------------
- Two risk modes: fixed money amount or percent of capital base.
- Capital base selectable: balance, equity, or free margin.
- Lot size derived from the actual SL distance and the broker's
per-symbol tick value / tick size. This matters MORE on indices than
on FX because contract sizes vary widely across instruments.
- Volume normalized against SYMBOL_VOLUME_MIN / MAX / STEP.
- SYMBOL_VOLUME_LIMIT respected — the calculated lot is clamped against
the per-symbol open-volume cap, summing positions and pending orders
across all magics on the symbol.
- OrderCalcMargin pre-check with a configurable safety buffer before any
order is sent.
Filters
-------
- ATR threshold: percent of D1 ATR(14) the candle range must exceed.
- Doji filter: body as percent of candle range must exceed threshold.
- Spread filter: optional max spread in points at placement time. Default
raised to 200 points to accommodate index spreads at the open.
- Weekday filter: independent on/off toggles for Monday through Friday.
- Holiday filter: optional, configured via a semicolon-separated list of
YYYY.MM.DD dates. Recommended ON for stocks (earnings, ex-dividend,
exchange holidays).
Entry modes (new in V1.1)
-------------------------
The opening candle's extreme is a mathematically optimal entry — IF price
returns to it. In live trading, it sometimes runs further in the
continuation direction first and only later retraces. V1.1 lets you wait
for an M5 reversal pattern to confirm the turn before entering.
Three modes are available:
- LIMIT_ONLY (V1 behavior): a passive limit order is placed at
the M15 candle's extreme immediately after the candle closes. TP at
Fib 0.382 / 0.618; SL at 50% of TP distance (reward:risk ~ 2:1).
- M5_CONFIRMED_ONLY (default): no limit is placed. Instead, the EA watches
every M5 bar that closes within the configured window. When it sees a
reversal pattern (bullish/bearish engulfing OR hammer/shooting star)
in the correct direction, it enters via market or stop order. If no
pattern appears within the window, no trade that day.
- HYBRID: places the V1-style limit AND watches M5. If the M5 pattern
fires first, the limit is canceled and the EA enters from the
confirmation. If the limit fills first, the M5 watch is dropped. If
neither happens, the limit runs to its native expiration.
In M5_CONFIRMED_ONLY and HYBRID modes the TP/SL geometry is configurable:
- TP at user-defined Fib level (default 0.5)
- SL distance = TP distance / risk-reward ratio (default 2.0, giving
reward:risk = 2:1)
The order type for M5 entries can be a market order (fills immediately at
the M5 close) or a stop order at the M5 candle's far extreme (only fills
if price moves back through the reversal candle, adding a second filter).
Pattern definitions:
- Bullish engulfing: previous bear candle, current bull candle whose body
fully covers the previous body. SELL setups require the BEARISH
version (mirror).
- Hammer: small body (<= 33% of range by default) near the top of the
candle range, with a long lower wick (>= 2x body by default). The
bearish equivalent is the "shooting star" (small body at bottom of
range, long upper wick).
All pattern parameters are exposed as inputs and optimizer-friendly.
Multi-EA / restart safety
-------------------------
Every position and every order is filtered by Symbol and Magic Number, so
the EA never touches anything that does not belong to it. Critical state
fields are persisted to terminal global variables and reconciled on init
against the live state of the account — pending orders, open positions,
and today's order/deal history. After a terminal restart the EA resumes
in the correct phase without duplicate orders.
MT5 Market safety compliance
----------------------------
- No DLLs, no WebRequest, no external EX5/EX4 dependencies.
- All trading-permission flags checked before every send.
- Stops level and freeze level enforced for entry, SL, and TP distances.
- Margin pre-check via OrderCalcMargin against ACCOUNT_MARGIN_FREE.
- Volume validated against MIN / MAX / STEP / LIMIT.
- Pending orders use native ORDER_TIME_SPECIFIED expiration.
- One placement attempt per logical decision per day per symbol — no retry
spam in the journal.
- Filter rejections logged once per day, not per tick.
- All inputs validated in OnInit; bad parameters return INIT_PARAMETERS_INCORRECT.
- Indicator handles created in OnInit and released in OnDeinit.
- Tester-compatible: TimeCurrent driven, deterministic, no Sleep.
Input parameters
----------------
Identification
- Magic Number, Trade Comment, Slippage (deviation in points)
Session
- Market Open Hour (default 9), Market Open Minute (default 30) — NYSE cash open
- Timezone Offset Hours, Timezone Offset Minutes
- Fib Hours (display window and pending-order expiration)
Signal
- ATR Period, ATR Threshold %
- Doji Body % of range
- Use Spread Filter, Max Spread Points (default 200)
Entry Mode (V1.1)
- Entry Mode (LIMIT_ONLY / M5_CONFIRMED_ONLY / HYBRID)
- M5 Order Type (Market / Stop at M5 extreme)
- Use Engulfing patterns, Use Hammer / Shooting Star
- Hammer Wick Ratio (long wick / body, default 2.0)
- Hammer Body Max % of range (default 33.0)
TP / SL Geometry (V1.1 — used in M5 / Hybrid modes)
- TP Fib Level (default 0.5)
- Risk:Reward Ratio (default 2.0)
Weekday and Holiday
- Trade Monday / Tuesday / Wednesday / Thursday / Friday
- Use Holiday Filter, Holiday Dates list
Risk
- Risk Mode (Fixed Money / Percent)
- Fixed Risk amount
- Percent Risk
- Capital Base (Balance / Equity / Free Margin)
- Margin Buffer %
Visualization
- Draw Fib (on/off), Fib Color
- Show Info Label
Recommended setup
-----------------
- Symbols: US30, NAS100, SPX500, GER40, UK100, JP225, AUS200, or stock CFDs
on liquid blue chips.
- Timeframe: M15 chart. Strategy operates on M15 internally.
- Account type: hedging or netting. The EA holds at most one position per
symbol from its own logic, so both modes work.
- Leverage: 1:20 or higher recommended. Index margin requirements vary by
broker; the EA sizes by risk regardless.
- Minimum deposit: USD 2,000+ recommended for indices at 1% percent-risk.
Stock CFDs require less if the symbol's contract size is small.
- VPS: recommended. The cash session open is the critical window — a
stable connection during that window matters most.
- Holiday filter: enable and populate for stocks. Major exchanges have
multiple half-days and full closures per year.
Before you buy
--------------
Always test on the symbol and timeframe you intend to run, using the MT5
Strategy Tester with realistic spread and commission. Optimize the ATR
threshold, doji filter, and Fib hours window for your chosen instrument —
volatility regimes differ significantly between US, European, and Asian
indices, and dramatically across single-stock CFDs.
Past performance does not guarantee future results. Trading leveraged
instruments carries substantial risk. Use risk settings appropriate to
your capital and experience.
Copyright © 2026 AMS Trading FZ-LLC. All rights reserved.
