Tab and Run Scalper
- Experts
-
AMS Trading
We code Indicators and Experts in MT4 and MT5 for real traders requiring robust, modular, reliable and extensible systems.
• You're an IB or Trader with a clear trading recipe.
• We're engineers who build it with extensibility, stability and user-friendliness. - Versione: 1.0
- Attivazioni: 5
vTab and Run Scalper Indices V1
==============================
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), Tab and Run "tabs" the first
M15 candle — anchoring on its high and low. After that candle closes, the
EA "runs" by placing a single counter-trend limit order that targets a
Fibonacci retracement of the candle range:
- Bullish tab candle -> SELL LIMIT at the candle high, target Fib 61.8.
- Bearish tab 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).
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)
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.
