Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
The Liquidity Sweep Ote Continuation strategy is a pure price-action expert advisor for MetaTrader 5 built around the ICT (Inner Circle Trader) "Optimal Trade Entry" concept — a retracement-entry pattern popular among smart-money and order-flow traders. It uses no technical indicators at all. Instead, it reads raw OHLC (open, high, low, close) candle data on a single chart timeframe and maps market structure directly from confirmed swing pivots, making it a transparent tool for studying how stop-runs and structure shifts are detected mechanically.
The strategy is designed for trending or post-reversal market conditions where price first sweeps a pool of resting liquidity (the cluster of stop-loss orders sitting just beyond an obvious swing high or low) and then shifts direction with a clear impulse. It is not a grid system, a martingale, or a scalper that fires on every tick — it patiently waits for a specific three-stage sequence to complete before it considers a single trade. Because it acts only after structure has visibly changed, it tends to stay flat during choppy, directionless ranges.
As a learning tool, this expert advisor is best suited to intermediate traders who want to see how the textbook "liquidity grab → break of structure → discount/premium entry" model can be translated into deterministic, repeatable code. Studying it helps you understand swing-pivot detection, state machines, and risk-anchored entries. It is presented here for educational analysis of a well-known trading pattern, not as a profit opportunity.
How It Works
The Liquidity Sweep Ote Continuation strategy builds every trade through a three-stage state machine. It evaluates conditions once per fully-closed bar, ignoring the still-forming candle, and it never holds more than one position at a time.
Market structure mapping
- The strategy continuously identifies fractal swing pivots — a candle whose high (or low) dominates a set number of bars on each side, controlled by
SwingLookback. - The most recent confirmed swing high and swing low become the reference levels for everything that follows.
Stage 1 — The liquidity sweep (the signal to arm)
- For a potential long, the strategy signals a setup when a candle wicks below the most recent swing low (raiding sell-side liquidity) but then closes back above it. The low of that raid becomes the protected "raid extreme."
- For a potential short, the mirror applies: a candle wicks above the swing high (raiding buy-side liquidity) and closes back below it.
- The opposing swing level is stored as the structure the next stage must break.
Stage 2 — The displacement / break of structure
- After a long sweep, the strategy waits for a candle to close above the prior swing high — a bullish break of structure (BoS) confirming order flow has shifted up. The move from the raid low to the break high becomes the "dealing range" or displacement leg.
- For a short, it waits for a candle to close below the prior swing low.
- If price instead closes back through the raid extreme, or if too many bars pass (
MaxSweepToBosBars), the setup is discarded.
Stage 3 — The Optimal Trade Entry (OTE)
- The strategy then waits for price to retrace into the OTE pocket of the displacement leg — the discount zone for longs or premium zone for shorts, between
OteShallowandOteDeepof the range (the classic 62%–79% retracement band). - Entry triggers only when a candle tags that pocket and closes in the trade direction (a bullish close for longs, bearish for shorts), confirming the retrace is being rejected.
Stop-loss logic
- The stop is placed just beyond the raid extreme — the liquidity that has already been taken — plus a small buffer of 5% of the leg's range. The logic assumes that spent liquidity should not be revisited if the read is correct.
Take-profit logic
- The target is a fixed multiple of the measured risk, set by
RiskRewardRatio. With the default of 2.0, the take-profit sits twice as far from entry as the stop. Once a position is open, the broker's SL/TP levels manage the exit.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingLookback | 3 | 2 | 6 | Number of bars a candle must dominate on each side to confirm a fractal swing pivot. Higher values mean fewer, more significant pivots. |
| OteShallow | 0.62 | 0.50 | 0.72 | The shallow edge of the Optimal Trade Entry pocket, as a fraction of the displacement leg (62% by default). |
| OteDeep | 0.79 | 0.70 | 0.90 | The deep edge of the OTE pocket (79% by default). Together with OteShallow it defines the discount/premium entry band. |
| RiskRewardRatio | 2.0 | 1.0 | 5.0 | The fixed reward-to-risk multiple used to place the take-profit relative to the stop distance. |
| MaxSweepToBosBars | 8 | 2 | 25 | Maximum bars allowed between the liquidity sweep and the break of structure before the setup expires. |
| MaxOteBars | 12 | 3 | 40 | Maximum bars allowed between the break of structure and the OTE retrace tag before the setup expires. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots for each position. |

Recommended Chart Settings
This strategy was designed to operate on the primary (chart) timeframe only, reading raw candles from whatever chart you attach it to. Because the ICT liquidity-and-structure model is most cleanly observed on intraday charts, many traders study it on liquid instruments such as major forex pairs (for example EUR/USD or GBP/USD) or index CFDs, typically on the M15, M30, or H1 timeframes where swing pivots are well-defined and spreads remain modest.
There is no single "correct" market for this approach. The swing-pivot, sweep, and OTE logic is generic, so you are encouraged to test it across several symbols and timeframes. Keep in mind that results will vary significantly across different instruments, sessions, and volatility regimes — a setting that maps structure well on one pair may behave very differently on another.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Like every mechanical system, the Liquidity Sweep Ote Continuation strategy has clear strengths and equally clear limitations that you should understand before relying on it for any decision.
Strengths
- Indicator-free transparency. Every decision comes from raw price, so there is no lag from moving averages or oscillators, and the logic is fully auditable.
- Patient, confirmation-based entries. It only engages after liquidity has been swept and structure has actually shifted, which historically filters out many low-quality signals.
- Defined risk on every trade. The stop is anchored to a real market level (the raid extreme), and the reward is a fixed multiple of that risk.
Limitations
- Range-bound chop is the enemy. In sideways markets, false sweeps and failed breaks are common, and the strategy may repeatedly arm and then invalidate without taking a trade — or take trades that get stopped out.
- Subjectivity is removed, but so is discretion. A fixed
SwingLookbackcannot adapt to changing volatility the way a human reading the same chart might. - Sensitivity to parameters. The OTE band, expiry windows, and lookback all interact; small changes can meaningfully alter how many setups appear. This makes thorough, honest testing essential and raises the risk of curve-fitting if you over-optimize.
- Spread and slippage around fast displacement moves can affect fills, especially on lower timeframes or during news.
This is a tool for studying a structured price-action concept, not a hands-off solution. Treat any signal it generates as a starting point for analysis, not a recommendation.
Risk Management Tips
Sound risk management matters far more than any single entry model. Consider these general principles as part of your education:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of account equity on a single position, so that a string of losses does not threaten the account.
- Size positions deliberately. The default
Lotsvalue is fixed; align your volume with your account size and the stop distance rather than trading an arbitrary lot size. - Test on a demo account first. Run the strategy in a risk-free simulated environment for an extended period before considering any live capital, so you understand its behavior across different conditions.
- Understand drawdown. Even a well-constructed strategy will experience losing streaks. Know the maximum historical drawdown you are willing to tolerate and how it would feel in real time.
- Keep records and review. Journaling each setup helps you learn what the system does well and where it struggles.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: LiquiditySweepOteContinuation.ex5 (0 downloads)
- Source Code: LiquiditySweepOteContinuation.mq5 (0 downloads)
- Documentation: LiquiditySweepOteContinuation.pdf (0 downloads)