BISMILLAH ORDER BLOCK EA (MT4)
An MT4 Expert Advisor built on Smart Money Concepts order blocks:
impulse + break of structure -> the last opposite candle becomes the zone,
entry on the retest, Stop Loss behind the zone, Take Profit at liquidity.
MT5 VERSION
An equivalent MetaTrader 5 build, "Bismillah Order Block EA MT5", is published
as a separate product. It uses the same order-block logic and the same input
names, so settings can be transferred between the two versions without changes.
Choose the build that matches your terminal.
HOW THE LOGIC WORKS
1. On every enabled timeframe the EA measures an impulse candle: the body/range
must exceed InpImpulseATR x ATR and must break the previous swing structure.
2. The last opposite candle in front of that impulse is stored as the order-block
zone (body-based or high/low-based, your choice).
3. Zones are filtered by minimum and maximum height (ATR multiples), duplicates and
maximum age, so old or overlapping blocks are dropped.
4. When price returns to a valid zone, a market order is sent with:
- Stop Loss behind the zone with an ATR buffer,
- Take Profit at the opposite liquidity, by ATR multiple, or by risk/reward.
5. Positions are managed by ATR break-even and ATR trailing stop.
MAIN FEATURES
- Multi-timeframe engine: 9 timeframes supported, M1-M30 disabled by default,
H1 / H4 / D1 / W1 enabled by default.
- Three take-profit modes: opposite liquidity, ATR multiplier, risk/reward ratio.
- Three lot sources: fixed lot, risk percent per trade, balance-proportional lot.
- Optional timeframe lot weight, e.g. W1 trades three times the H1 volume.
- Higher-timeframe trend filter based on fractal swing structure.
- ATR break-even with a configurable lock, ATR trailing stop with step and
stop-level/freeze-level validation.
- Equity protection (maximum drawdown) and daily loss limit - both close the
EA's own positions and pause trading.
- Maximum open positions and one-position-per-timeframe limit.
- Maximum spread filter, session guard and optional candle countdown on the panel.
- On-chart dashboard: state, trend, ATR, active BUY/SELL zone counts per timeframe.
- Every entry has a Stop Loss. No grid, no martingale, no averaging, no DLL,
no external files, no third-party dependencies.
- Magic number based position filtering: safe to run next to other EAs.
RECOMMENDED SETTINGS
Symbol: XAUUSD (tested on XAUUSDc / XAUUSDm). Re-tune for other pairs.
Timeframes: H1, H4, D1, W1.
Deposit: from 1000 USD. Recommended lot 0.01. Leverage 1:500.
Recommended spread: up to 20-35 points (set the value you actually tested with).
Magic number: keep it unique on the account.
Allow automated trading in the terminal (Tools -> Options -> Expert Advisors).
HOW TO START
1. Attach the EA to any XAUUSD chart - the timeframe of the chart does not affect
the multi-timeframe engine.
2. Check InpEnableTrading = true and that automated trading is allowed.
3. Optimise and validate in the Strategy Tester before using a live account.
4. Start on a demo account and increase the lot only after your own verification.
MAIN INPUTS
InpMagicNumber, InpEnableEA, InpEnableTrading, InpEnableDebugLog, InpNewBarOnly,
InpShowDashboard, InpSlippagePoints, InpMaxSpreadPoints,
InpUseM1...InpUseW1 (per-timeframe switches),
InpScanBars, InpImpulseATR, InpZoneLookback, InpZoneATRBuffer, InpUseBodyOnly,
InpMinZoneATR, InpMaxZoneATR, InpDupZoneATR, InpMaxZoneAgeBars,
InpATRPeriod, InpEnableBreakEven, InpBEStartATR, InpBELockATR,
InpEnableTrailing, InpTrailATR, InpTrailStartATR, InpTrailStepPoints, InpMaxSLPoints,
InpUseTrendFilter, InpSwingLookback,
InpFixedLot, InpUseRiskPercent, InpRiskPercent, InpUseBalanceLot, InpBalancePerLot,
InpMaxLot, InpMaxOpenPositions, InpOnePositionPerTF,
InpTPMode (liquidity / ATR / risk-reward), InpTPATRMult, InpTPRiskReward,
InpEnableEquityProtection, InpMaxDrawdownPercent, InpMaxDailyLossPercent,
InpShowCandleTimer,
InpUseTFLotWeight, InpWeightM3...InpWeightW1,
InpSessionGuardMinutes.
RISK DISCLAIMER
Trading on margin involves substantial risk. Backtest results depend on the
broker's spread, commission and execution quality, and do not guarantee future
performance. The EA implements a specific trading logic; it is not a promise of
profit. Test it yourself and trade only with funds you can afford to lose.