Gold Liquidity BOS EA
- Experts
- Version: 1.8
- Activations: 5
Gold Liquidity BOS EA is an automated Expert Advisor developed specifically for trading XAUUSD (Gold) on the M15 timeframe.
The strategy is built around a structured price-action process rather than simple indicator crossovers. It combines liquidity sweeps, market structure, Break of Structure (BOS), BOS displacement confirmation, Fibonacci retracement entries, M15 EMA50 confirmation and H4 higher-timeframe directional bias.
The EA is designed to wait for a complete sequence of market conditions before considering an entry.
Instead of chasing price immediately after a breakout, the strategy waits for liquidity to be taken, confirms a structural break with sufficient displacement, and then waits for price to retrace to the 68% Fibonacci level before placing a pending order.
The default money-management model risks 1% of current account equity per trade and uses a fixed 1:3 Reward/Risk target.
The EA does not use Martingale, Grid averaging, recovery positions or multiple simultaneous full-risk trades.
STRATEGY LOGICThe complete trading sequence is:
Liquidity → Sweep → BOS → BOS Displacement → Trend Confirmation → Fibonacci 68% Retracement → Entry → Structural Stop Loss → 1:3 Take Profit
Every stage must meet the strategy requirements before an entry can be created.
1. LIQUIDITY DETECTION
The EA continuously analyzes the M15 market structure to identify relevant swing highs and swing lows.
These areas can represent:
Buy-Side Liquidity (BSL) above relevant market highs.
Sell-Side Liquidity (SSL) below relevant market lows.
Not every small swing is automatically considered valid liquidity.
Liquidity levels are filtered using ATR-based distance and reaction requirements to reduce insignificant market noise and avoid treating every minor high or low as a meaningful liquidity level.
The default logic uses dedicated pivot calculations for both market structure and liquidity detection.
2. LIQUIDITY SWEEPAfter identifying a valid liquidity level, the EA waits for price to sweep that liquidity.
For a potential LONG setup, price must move below a valid Sell-Side Liquidity level and subsequently close back above that level.
For a potential SHORT setup, price must move above a valid Buy-Side Liquidity level and subsequently close back below that level.
This behavior is used to identify situations where price trades through an existing liquidity area but fails to continue in the same direction.
A liquidity sweep alone is not sufficient to open a trade.
The EA requires additional structural confirmation.
3. BREAK OF STRUCTURE – BOSAfter a valid liquidity sweep, the EA waits for a confirmed Break of Structure (BOS).
For a LONG setup, price must break above the relevant structural high.
For a SHORT setup, price must break below the relevant structural low.
The BOS must occur within the permitted number of M15 candles after the liquidity sweep.
With the default configuration, the EA allows a maximum of 14 M15 bars between the sweep and the BOS confirmation.
This corresponds to approximately 3.5 hours of M15 market activity.
Only the first qualifying BOS following the sweep is used for the setup.
4. BOS DISPLACEMENT FILTERA structural break alone does not automatically qualify.
The EA also evaluates the strength of the BOS candle.
The candle body is compared with ATR(14) to determine whether the breakout contains sufficient displacement.
Default minimum BOS displacement:
0.70 ATR
This means that the body of the BOS candle must be at least 70% of the current ATR measurement.
The purpose of this filter is to avoid weak structural breaks and favor situations where the market shows stronger directional movement following the liquidity sweep.
5. M15 EMA50 DIRECTIONAL FILTERThe EA uses a 50-period Exponential Moving Average on M15 as an additional directional filter.
For LONG setups:
Price must be above the M15 EMA50.
For SHORT setups:
Price must be below the M15 EMA50.
This helps prevent the EA from taking every technically valid sweep/BOS combination when the immediate M15 market direction does not support the trade.
6. H4 HIGHER-TIMEFRAME BIASThe EA also analyzes the H4 timeframe before allowing an entry.
The higher-timeframe filter uses the H4 EMA50 and its direction.
For LONG setups, the strategy requires bullish H4 conditions.
Price must be positioned appropriately relative to the H4 EMA50 and the EMA must show bullish directional behavior.
For SHORT setups, the opposite conditions are required.
The purpose of this filter is to align M15 setups with the broader H4 market direction.
Therefore, a valid M15 liquidity sweep and BOS can still be rejected if the higher-timeframe conditions do not support the trade direction.
7. FIBONACCI 68% RETRACEMENT ENTRYAfter the liquidity sweep, confirmed BOS, displacement and trend filters, the EA does not immediately enter at market.
Instead, it calculates the relevant structural movement and waits for a retracement.
The default entry level is:
Fibonacci 68%
For LONG setups, the EA places a Buy Limit order at the calculated Fibonacci retracement level.
For SHORT setups, it places a Sell Limit order.
This allows the strategy to seek a deeper retracement after the confirmed directional move instead of chasing price at the BOS candle.
If the relevant structure develops before entry, the active setup can be updated according to the strategy rules.
8. STRUCTURAL STOP LOSSThe Stop Loss is not based on an arbitrary fixed number of points.
It is determined from the market structure that created the setup.
For LONG trades, the Stop Loss is positioned at the structural invalidation level below the setup.
For SHORT trades, it is positioned above the relevant structural invalidation level.
Because Stop Loss distance changes according to market structure and volatility, the EA automatically adjusts position size to maintain the selected percentage risk.
9. TAKE PROFIT – 1:3 REWARD/RISKThe default Take Profit uses a fixed:
1:3 Reward/Risk Ratio
For every 1 unit of initial risk, the target distance is 3 units.
For example, if the distance between entry and Stop Loss represents 100 points, the theoretical Take Profit distance will be approximately 300 points.
This also means the strategy does not require an unusually high win rate to achieve positive expectancy.
A theoretical 1:3 Reward/Risk structure has a break-even win rate of approximately 25% before trading costs.
Actual results depend on execution, spreads, commissions, slippage and market conditions.
10. AUTOMATIC POSITION SIZINGGold Liquidity BOS EA includes automatic percentage-based position sizing.
The default risk is:
1% of current account equity per trade
The EA calculates trading volume using factors including:
- Current account equity
- Selected Risk %
- Entry price
- Stop Loss distance
- Symbol tick size
- Symbol tick value
- Minimum trading volume
- Maximum trading volume
- Broker volume step
Because the Stop Loss is structural, two trades can have different Stop Loss distances while still targeting approximately the same percentage of account equity risk.
Users can change the risk percentage according to their own risk tolerance.
11. ONE TRADE AT A TIMEThe strategy is designed around controlled exposure.
Only one active EA position is allowed at a time.
When an EA position is already open, the system does not open another position.
The EA also manages its pending entry logic to prevent duplicate simultaneous entries.
When a newer valid setup requires an existing pending order to be replaced, the old pending order must first be successfully removed before a replacement can be submitted.
This is specifically designed to prevent accidental multiplication of the selected percentage risk.
12. TRADING SESSIONNew entries are restricted to a configurable trading session.
Default session:
08:00 – 20:00 broker/server time
The session is based on the MetaTrader broker/server clock, not the trader's local computer clock.
When the permitted entry session ends, unfilled pending entries can be removed.
Existing open positions are not automatically closed at 20:00.
An existing position remains active according to its original Stop Loss and Take Profit.
13. TRADE MANAGEMENTThe default strategy deliberately keeps post-entry management simple.
Default configuration uses:
No Break Even
No Trailing Stop
No Partial Close
No Martingale
No Grid
No averaging into losing positions
Once a trade is triggered, it is primarily managed through the predefined structural Stop Loss and fixed Reward/Risk Take Profit.
DEFAULT CONFIGURATIONSymbol: XAUUSD / Gold
Timeframe: M15
Entry: Fibonacci 68% retracement
Reward/Risk: 1:3
Default Risk: 1% of current equity
BOS Displacement: Minimum 0.70 ATR
ATR Period: 14
M15 EMA50 Filter: Enabled
H4 EMA50 Bias: Enabled
Maximum Sweep-to-BOS Window: 14 M15 bars
Entry Session: 08:00–20:00 server time
One Trade at a Time: Enabled
Martingale: No
Grid: No
Break Even: No
Trailing Stop: No
Partial Close: No
Gold Liquidity BOS EA has been evaluated over both recent and longer historical XAUUSD periods.
The screenshots provided on this product page show MetaTrader 5 Strategy Tester results and strategy behavior.
XAUUSD M15 – 2023–2026 TEST
The recent historical test shown in the screenshots was performed with a starting deposit of $100,000.
Reported Strategy Tester statistics include:
Initial Deposit: $100,000
Net Profit: $79,778.64
Profit Factor: 1.26
Recovery Factor: 2.32
Expected Payoff: $259.87
Sharpe Ratio: 3.39
Total Trades: 307
Profitable Trades: 95 (30.94%)
Losing Trades: 212 (69.06%)
Maximum Balance Drawdown: 19.13%
Maximum Equity Drawdown: 20.67%
History Quality: 99%
These results demonstrate the behavior of the strategy during this specific historical testing period and under the tested conditions.
They should not be interpreted as expected future returns.
LONG-TERM TESTINGLonger-term testing is also presented in the product screenshots to provide additional information about how the strategy behaved across different historical market environments.
Long-term testing is particularly important because market conditions change over time.
Periods of strong strategy performance can be followed by periods of drawdown or weaker performance.
For this reason, users should evaluate not only profitability but also drawdown, number of trades, Profit Factor and overall behavior of the strategy before selecting their preferred risk level.
WHY THE WIN RATE IS NOT HIGHGold Liquidity BOS EA is not designed to maximize win rate.
The default strategy targets approximately three units of reward for one unit of initial risk.
As a result, losing trades can occur frequently.
This is intentional within the strategy design.
The objective is not to create an artificially high win rate using Martingale, Grid or increasing position sizes after losses.
Instead, the strategy relies on the relationship between average risk and potential reward.
Users should therefore be comfortable with losing streaks and drawdowns before using the EA.
BROKER AND EXECUTION DIFFERENCESBacktest and live results can differ between brokers.
XAUUSD trading conditions can vary significantly depending on:
- Spread
- Commission
- Slippage
- Execution speed
- Tick data
- Historical data
- Contract size
- Tick value
- Minimum lot
- Volume step
- Stop level requirements
- Trading sessions
- Symbol suffixes/prefixes
- Liquidity conditions
Users should therefore test Gold Liquidity BOS EA with their own broker before using it on a live account.
RECOMMENDED USEThe EA was developed around:
XAUUSD / GOLD
M15 timeframe
Users are encouraged to:
Test the EA in the MetaTrader 5 Strategy Tester using their broker's historical data.
Verify symbol specifications and trading costs.
Run the EA on a demo account before live deployment.
Select a risk percentage appropriate for their own account size and risk tolerance.
Ensure automated trading is enabled in MetaTrader 5.
Keep MetaTrader 5 running or use a suitable VPS when continuous operation is required.
IMPORTANT RISK INFORMATIONTrading financial markets involves risk.
The default 1% risk per trade does not guarantee that account drawdown will remain at 1%.
Multiple consecutive losing trades can create significantly larger cumulative drawdowns.
Historical testing has included periods of substantial drawdown.
Users should select their risk level based on their own financial circumstances and tolerance for losses.
Reducing the Risk % setting will generally reduce both potential gains and potential losses relative to the same sequence of trades.
DISCLAIMERAll screenshots, statistics, charts and backtest results displayed on this product page represent historical simulated Strategy Tester performance under specific testing conditions.
Historical results are not a guarantee, prediction or promise of future performance.
Real trading results may differ due to spreads, commissions, slippage, broker execution, market liquidity and other factors.
Past performance does not guarantee future results.
