Bismillah Gold Order Block EA

**Bismillah Gold Order Block EA**

An expert advisor for XAUUSD (gold) that trades Order Blocks — price zones where large market participants previously entered the market. The EA finds these zones automatically on several timeframes, waits for the price to come back to the zone and opens a trade with a stop loss already attached. No martingale, no grid, no averaging.

You do not have to change anything to start: the default settings are ready to use. Attach the EA to a XAUUSD chart, allow automated trading, and it works.

**How it works — in simple words**

1. The EA looks for a strong impulse candle — a candle that is clearly bigger than normal (bigger than the ATR value) and closes beyond the previous candle. Such a candle usually leaves a zone behind it.
2. The last candle of the opposite colour before this impulse becomes the Order Block zone.
3. The zone is checked: it must not be too small or too large, it must not duplicate an existing zone, and it must not be too old. Zones that price has already broken are removed automatically.
4. When the price returns and touches a valid zone, the EA opens a trade with a stop loss behind the zone.
5. The trade is managed automatically: break-even, trailing stop, and a take profit at the opposite liquidity level (or by ATR / risk-reward, your choice).

**Advantages**

- Every trade has a stop loss from the first second. The EA never opens a trade without a stop.
- No martingale, no grid, no averaging — losses are not hidden and not moved to a worse price.
- Four timeframes are enabled by default (H1, H4, D1 and W1). These are the timeframes that stayed positive in both price models of the Strategy Tester.
- You can enable or disable every timeframe separately (M1 to W1) and give each timeframe its own lot weight.
- Works on both hedging and netting accounts; on a netting account it keeps one position per symbol.
- Built-in protection: maximum drawdown limit and maximum daily loss limit, margin check before entry, broker stops level and freeze level check, maximum spread filter, session guard before the market close.
- Optional dashboard on the chart: balance, equity, spread, trend direction and active zones for each timeframe, plus a candle countdown.
- Trend filter based on a higher timeframe fractal, so trades against the main direction can be filtered out.
- The EA is fully self-contained: one file, no external indicators, no DLL.
- You do not need to change anything to start — the default settings are ready to use.

**Recommended settings**

- Symbol: XAUUSD (tested on XAUUSDm, 1 lot = 100 ounces, and on a cent account XAUUSDc).
- Chart timeframe: M15. It is used only for the dashboard; the EA analyses its own timeframes.
- Timeframes: H1, H4, D1 and W1 enabled by default.
- Lot: 0.01. On a standard gold contract this is already 1 ounce.
- Deposit: 1000 USD is the tested minimum; 5000 USD or more is safer.
- Leverage: 1:500 or higher.
- Broker: the tests were carried out on Exness (XAUUSDm, 1 lot = 100 ounces). The EA works on any broker that offers XAUUSD; the spread, the commission and the swap of your broker change the result.

**Input parameters**

- **01. GENERAL** — magic number, switch the EA on/off, allow trading, debug log, work only on a new bar, show the dashboard, allowed slippage, maximum spread.
- **02. TIMEFRAMES** — enable or disable M1, M3, M5, M15, M30, H1, H4 and W1. H1, H4, D1 and W1 are on by default. M1–M30 are off, because the low timeframes were not stable in the "Every tick" model.
- **03. ORDER BLOCK** — how big the impulse must be (in ATR), how many bars to scan, how many candles to look back for the zone, the stop loss buffer in ATR, use the candle body only, minimum and maximum zone height, duplicate zone tolerance, maximum zone age in bars.
- **04. ATR / TRAILING** — ATR period, break-even switch with its trigger and lock, trailing switch, trailing distance, trailing start and trailing step, maximum stop loss in points.
- **05. TREND FILTER** — the higher timeframe fractal trend filter and its lookback.
- **06. RISK** — fixed lot, or lot calculated from a risk percent of the balance, maximum lot, maximum number of open positions, one position per timeframe. The published backtests use the fixed lot 0.01; the risk percent mode is available but was not part of the published figures.
- **07. TAKE PROFIT** — take profit mode (opposite liquidity, ATR multiple, or fixed risk/reward) and the values for it.
- **08. EQUITY PROTECTION** — switch, maximum drawdown percent of the balance, maximum daily loss percent.
- **09. CANDLE TIMER** — show or hide the candle countdown on the dashboard.
- **10. TF LOT WEIGHT** — optional lot multiplier for each timeframe. Off by default; with weight 1.0 the lot is exactly the fixed lot.
- **11. SESSION GUARD** — how many minutes before the end of the trading session new trades are skipped (-1 turns this off).

**How to use it — read this first**

1. Attach the EA to a XAUUSD chart and allow automated trading (the "Algo Trading" button in the terminal must be green).
2. Keep the default settings. Do not enable M1–M30 unless you have tested them yourself — in the "Every tick" model the low timeframes lost money.
3. Test it in the Strategy Tester on your own broker, and run it on a demo account, before you use real money.
4. Make sure "Profit in pips" is switched OFF in the Strategy Tester. If it is on, the tester shows profit in pips instead of money and the equity protection works on a pips balance, so the result is not comparable with real trading.

**Run your own test**

1. Open MetaTrader 5 → View → Strategy Tester.
2. Select the expert "Bismillah Gold Order Block EA", symbol XAUUSD of your broker, timeframe M15.
3. Choose the period, for example 2025.01.01 – 2026.11.04, deposit 1000 USD, leverage 1:500.
4. Switch OFF "Profit in pips". All figures in this description are in money.
5. Run the model "1 minute OHLC" first — it is fast.
6. Then run "Every tick" — it is slower but more realistic. Do not stop a visual test halfway: the result will be wrong.
7. Compare results only inside the same model. An OHLC result must not be compared with an Every tick result.
8. As the final check, use "Every tick based on real ticks" if your broker has enough real tick history. Add your broker's commission, swap and execution delay to get closer to live conditions.

**Testing**

Environment: the tests were carried out on an Exness demo account, in the MetaTrader 5 Strategy Tester, currency USD, symbol XAUUSDm (1 lot = 100 ounces), period 2025.01.01 - 2026.11.04 (about 22 months), starting deposit 1000 USD, leverage 1:500, fixed lot 0.01, no commission, execution delay 0. "Profit in pips" was switched OFF, so all figures below are in money (USD).

Default set (H1, H4, D1, W1; M1–M30 off):

| Model | Profit | Profit factor | Trades | Max drawdown |
|---|---|---|---|---|
| 1 minute OHLC | +4379.12 USD | 1.3126 | 2107 | 16.3% |
| Every tick | +2442.24 USD | 1.1562 | 2130 | 27.9% |

Both models were positive for the default H1, H4, D1 and W1 set, with almost the same trade count (2107 and 2130), so the result does not depend on the price model.

W1 makes a real difference. With exactly the same settings but W1 switched off, the result was +2814.07 USD (1 minute OHLC, 2192 trades, drawdown 21.5%) and +1193.11 USD (Every tick, 2184 trades, drawdown 38.8%). That is why W1 is part of the default set.

**Warning: all timeframes together**

For comparison, the same EA with every low timeframe enabled (M3, M5, M15, M30, H1, H4, D1, W1), same period, same deposit, same lot:

| Model | Profit | Profit factor | Trades | Max drawdown |
|---|---|---|---|---|
| 1 minute OHLC | +19498.14 USD | 1.2642 | 43395 | 7.4% |
| Every tick | -993.00 USD | 0.8524 | 6894 | 99.3% |

In the fast "1 minute OHLC" model this looks like the best configuration, but in the realistic "Every tick" model the account was destroyed. That is why the low timeframes are switched off by default: the fast model does not show how those timeframes really behave.

**Cent accounts — why the numbers look smaller**

On a cent account the same lot number carries about 100 times less risk: for example XAUUSDc has a contract size of 1 ounce, while XAUUSDm has 100 ounces. The percentage results are the same, but the money numbers are about 100 times smaller. On a cent account, the default set gave +32.69 (1 minute OHLC) and +12.28 (Every tick), and with all timeframes enabled +195.86 (1 minute OHLC) and -20.96 (Every tick). The direction and the percentages repeat the USD results above; only the absolute values are smaller.

**Important**

- Backtest results do not guarantee profit. A backtest shows how the logic behaved on past data, not how the EA will work on your account.
- Spread, commission, swap and execution speed of your broker change the result. Test with your own conditions.
- These are Strategy Tester results, not live trading results.
- The maximum drawdown of the Every tick run (27.9%) is real: be ready for it and do not use money you cannot afford to lose.
- Start on a demo account first.

**Support**

Questions are answered in the Comments tab of this product page.
Filtro:
No hay comentarios
Respuesta al comentario