Outside Bar Trading System -MANUAL

Outside Bar Trading System -MANUAL

27 February 2026, 13:51
Ich Khiem Nguyen
0
17

PART
Section
Description
1 INTRODUCTION
Product introduction, what the product helps you with
     
2 INSTALLATION & SETUP
System requirements, step-by-step installation guide

Guide to Installing Free Indicators and EAs Included with the Mirage Trading System Purchase

3 INTERFACE DISPLAY
Explanation of the components displayed on the chart

 User Guide: Trading Lines & Signal Tracking System
The system automatically draws Entry, Stop Loss, and Take Profit lines (TP 1–4) on the chart, tracks price action for hits, records Win/Loss results, and displays real-time performance statistics.
  User Guide : Visualization, Zone Fill, Signal Dashboard & Cancelled Signals  When you attach an indicator to a chart, the system renders the following visual components for each detected signal

User Guide: MTF SCAN & Dashboard User Guide 
MTF SCAN automatically scans all Market Watch symbols across 8 timeframes (M1 to W1) and displays results on a Dashboard grid directly on your chart.
  User Guide : Chart Theme User Guide  Chart Theme is a feature that changes the entire chart color scheme in MetaTrader 5 — including the background, candles, grid, text, and Bid/Ask lines — with a single click.
4 CORE CONCEPTS
Fundamental concepts that the system is built upon

 User Guide: Market Structure Functionality in the Trading System
Identifies trend direction (Uptrend, Downtrend, Ranging) by analyzing swing highs/lows, and detects key events: BOS (trend continuation) and CHoCH (potential trend reversal).

User Guide : Signal Types, States, and Lifecycle  A signal is the system's notification when it detects a qualifying candlestick pattern on the chart. Each signal tells you the expected price direction and provides suggested entry, stop loss, and take profit levels.

5 SIGNAL FILTERS
Filters that refine and validate trading signals

 User Guide: Trade Direction (Direction Filter) in the Trading System
Defines the allowed trading direction (Buy only, Sell only, both, or neither) as the first filter before searching for entry signals, based on current market trend.

 User Guide: Signal Zone Filter in the Trading System
Eliminates signals not near important price zones, retaining only those connected to market structures (swing high/low, BOS, CHoCH) to reduce noise.

 User Guide: StoplossHunt Filter User Guide — Filtering "SL Sweep" Signals
Identifies higher-probability signals by checking whether price "swept stoploss" before forming a pattern.
   User Guide : Extreme Zone Filter
Extreme Zone Filter is a signal filtering feature that helps avoid entering trades when price is at the top or bottom of a Donchian price channel.
  User Guide: Opposite Signal Filter  The Opposite Signal Filter is an automatic feature that prevents new signals from appearing when you already have an active trade running in the opposite direction.The principle is very simple: Don't buy when you're selling. Don't sell when you're buying.
  User Guide : Quality Filter User Guide  Quality Filter is a feature that helps you receive only the best signals — price patterns formed clearly, with balanced proportions and high reliability — and reject weak signals, dull patterns, and those below standard.
 6  TRADE MANAGEMENT  
  User Guide : Risk/Reward & SL Method User Guide Risk/Reward (R:R) is the ratio between the amount of money you accept losing (Risk) and the amount of money you expect to gain (Reward) in a single trade.
  User Guide: Trailing Stop Loss (TSL) User Guide Regular Stop Loss (SL) stays fixed in one place. You set SL at 1990.00, and it stays there forever — even if price has risen to 2030.00.Trailing Stop Loss (TSL) is different. It automatically moves in your favor when price advances. As price moves up, TSL moves up with it. When price stalls or reverses, TSL holds the best position it reached.
7 CONFIGURATION PARAMETERS GUIDE
Detailed guide to each configuration parameter
   SIGNAL SCANNING CONFIGURATION GUIDE - MIRAGE TRADING SYSTEM EA  Guide to mastering signal scanning settings within the Inputs tab, optimizing trade discovery on a single chart or across the entire market.
 8  ALERTS & NOTIFICATIONS  
   User Guide: Alerts & Notifications User Guide  Configure push notifications, and on-screen popups when new signals are detected.
 9 SYSTEM RISKS & LIMITATIONS  Notes on system risks and limitations

1. INTRODUCTION

OutsideBarTradingSystem 1.00

2-Bar Continuation Pattern with Range-Engulfment Analysis

Author: Ich Khiem Nguyen | MQL5: https://www.mql5.com/en/users/khiemni/seller

What is OutsideBarTradingSystem?

OutsideBarTradingSystem detects Outside Bar candlestick patterns on your MetaTrader 5 charts automatically. The indicator evaluates each completed bar pair against four structural gates, scores surviving patterns across six weighted quality factors, and places pending buy stop or sell stop orders at the breakout level when a valid Outside Bar is confirmed. Entry price, stop loss, and take profit levels are drawn directly on the chart so you can assess the trade opportunity rather than perform the calculations manually.


What Is an Outside Bar Pattern?

An Outside Bar is a two-candle continuation formation where the second candle's range completely encompasses the first candle's range. The second candle's high exceeds the first candle's high, and the second candle's low falls below the first candle's low. This range expansion signals renewed volatility and directional commitment in the direction of the pattern's context (uptrend for bullish Outside Bar, downtrend for bearish Outside Bar).

The Outside Bar represents price range expansion after consolidation. Rather than immediately closing within the first candle's range (which would indicate indecision like an Inside Bar), the second candle's range expansion establishes that buyers or sellers have seized control and pushed price to new extremes. This structure often precedes continued movement in the established trend direction.

Bulkowski's research ranks the Outside Bar at position 2 among continuation patterns, with a 58% win rate in bull markets when the breakout is upward. The Outside Bar is a reversal of the Inside Bar pattern — where Inside Bar represents consolidation, Outside Bar represents expansion and momentum commitment.

Bullish Outside Bar

Appears during an uptrend or after a consolidation breakout above a resistance level. Bar 1 is any candle (large or small). Bar 2 engulfs bar 1's entire range: HIGH_2 > HIGH_1 AND LOW_2 < LOW_1. Both bars typically close higher (bullish body color), confirming that buyers maintain control. Entry is a pending buy stop order placed slightly above bar 2's high (HIGH_2 + 0.05×ATR), triggering if price breaks above the engulfing candle.

Bearish Outside Bar

Appears during a downtrend or after a consolidation breakdown below a support level. Bar 2 engulfs bar 1's entire range. Both bars typically close lower (bearish body color), confirming that sellers maintain control. Entry is a pending sell stop order placed slightly below bar 2's low (LOW_2 - 0.05×ATR), triggering if price breaks below the engulfing candle.

Uptrend Context Detection

The indicator checks the trend prior to the pattern formation. If the prior bars show higher lows and higher highs, the pattern is classified as a bullish Outside Bar continuation. The context detection examines the three bars before bar 1 to determine trend direction alignment.


How the Indicator Finds Patterns

The indicator evaluates each potential two-bar pattern against four sequential gates. All four must pass for a signal to be generated.

  1. Range Engulfment gate: Bar 2's high must exceed bar 1's high, and bar 2's low must fall below bar 1's low (HIGH_2 > HIGH_1 AND LOW_2 < LOW_1). This confirms the range expansion that defines the Outside Bar structure.

  2. Bar 2 Range Size gate: Bar 2's total range must represent at least the minimum required range/ATR multiple (Standard: 0.50×ATR, Strict: 0.60×ATR). This confirms that bar 2 is a significant range-expanding candle, not a small engulfing spike.

  3. Bar 2 Body Size gate: Bar 2's body must represent at least the minimum required body/ATR multiple (Standard: 0.20×ATR, Strict: 0.25×ATR). This ensures the candle has meaningful structure beyond just wicks, reducing whipsaw risk on pure spike patterns.

  4. Quality gates: Bar 2's relative range (bar 2 range / bar 1 range) must exceed the minimum threshold (Standard: 1.20×, Strict: 1.30×), and body ratio must be sufficient (Standard: 0.40, Strict: 0.45). These gates confirm that the engulfment is meaningful and the candle is not just marginally larger.

Only candles passing all four gates proceed to quality scoring and signal registration.


Quality Score — Evaluating Pattern Strength

Every pattern that clears detection receives a quality score between 0.00 and 1.00. Six factors contribute to this score, each weighted by its contribution to the Outside Bar's continuation reliability.

Quality Factors

Factor Weight What It Measures Direction
QF-1: Range/ATR 0.20 Bar 2's range size relative to recent volatility — larger is better Ideal [0.50, 2.00]
QF-2: Relative Range 0.20 Bar 2's range compared to bar 1's range — greater expansion is better Ideal [1.20, 2.50]
QF-3: CLV (Close Location Value) 0.20 For bullish, close near the high; for bearish, close near the low Ideal [0.75, 1.00]
QF-4: Body Ratio 0.15 Proportion of bar 2's range occupied by its body Ideal [0.40, 1.00]
QF-5: Trend Alignment 0.15 Confirmation that bar 2's direction matches the prior trend Ideal [0.80, 1.00]
QF-6: Body Color 0.10 Purity of bar 2's color — bullish bar 2 or bearish bar 2 [0.90, 1.00]

QF-1 and QF-2 carry equal weight (0.20 each) because both contribute to the core structural requirement: range expansion. Range/ATR measures absolute volatility expansion; Relative Range measures expansion relative to the immediately preceding candle.

Score Grades

  • Grade A (0.80 - 1.00) — Excellent: Large range expansion with solid body structure and strong trend alignment
  • Grade B (0.60 - 0.79) — Good: Reliable Outside Bar with clear range engulfment and moderate body quality
  • Grade C (0.40 - 0.59) — Average: Valid structure but range expansion is modest; use with additional confirmation
  • Grade D (0.20 - 0.39) — Below Average: Marginal setup; higher false breakout risk
  • Grade F (0.00 - 0.19) — Poor: Avoid trading these signals

Quality Threshold

The default minimum quality is 0.30. Adjusting this threshold changes which patterns appear on the chart:

  • 0.50 - 0.65: Shows only the most clearly expanded Outside Bars with strong range/ATR and solid body metrics — fewer signals with higher per-signal quality
  • 0.20 - 0.30: Shows more signals including weaker expansion examples — useful for research or studying the pattern across different market conditions
  • Tip: Start with the default 0.30 on your chosen symbol and timeframe and observe several dozen signals before adjusting

Entry Mode: Pending

Outside Bar patterns use pending buy stop or sell stop orders placed at the breakout level rather than immediate entry at bar close. When a valid Outside Bar is confirmed, the system creates a pending order at HIGH_2 + 0.05×ATR (bullish) or LOW_2 - 0.05×ATR (bearish). The order activates only if price breaks above (bullish) or below (bearish) that level, capturing the breakout move.

This reflects the nature of the pattern: bar 2's range engulfment establishes expansion potential, but the actual directional commitment occurs at breakout. Waiting for the breakout ensures entry aligns with market consensus rather than entering speculatively at bar close.

Trading Levels

Bullish Outside Bar:

  • Entry = Pending Buy Stop at HIGH_2 + 0.05×ATR
  • Stop Loss = pattern low − 0.25×ATR

Bearish Outside Bar:

  • Entry = Pending Sell Stop at LOW_2 - 0.05×ATR
  • Stop Loss = pattern high + 0.25×ATR

The pattern low/high is the minimum/maximum of bar 1 and bar 2. The stop loss buffer of 0.25×ATR is placed beyond this extreme. A break beyond the pattern extreme invalidates the continuation premise.

Take profit levels are calculated from entry using configurable risk-reward multiples (default: 1R, 2R, 3R, 4R from entry to stop distance).


What You See on the Chart

When an Outside Bar pattern passes all detection gates and quality filters, the indicator draws the following:

Signal Markers

  • Arrow icons: Upward green arrows mark bullish Outside Bar patterns; downward red arrows mark bearish patterns. Gray arrows indicate signals blocked by an active filter.
  • Quality labels: A numeric score (e.g., "0.65") appears near each signal, showing how the pattern ranked across all six quality factors.

Trading Lines

  • Entry line: An orange horizontal line at the pending order level — HIGH_2 + 0.05×ATR (bullish) or LOW_2 - 0.05×ATR (bearish)
  • Stop Loss line: A red horizontal line labeled "SL" — placed beyond the pattern extreme with an ATR buffer
  • Take Profit lines: Up to four green horizontal lines labeled TP1 through TP4, spaced at configurable R:R multiples from the entry level

Visual Zones

  • Pattern highlight: A shaded rectangle spans both bars of the Outside Bar, making it easy to identify which pair triggered the signal. The risk zone between entry and SL is shaded in red; reward zones between entry and each TP level are shaded progressively lighter.
  • Tracking dots: Small colored dots update as the signal state changes — white for pending (order placed, awaiting breakout), yellow for active (breakout triggered, trade live), green for target hit, red for stop hit.

Signal Lifecycle

  1. Pending: Pending buy stop or sell stop order is placed at breakout level — waiting for price to break above/below
  2. Active: Breakout triggered, trade entry occurred, trade is live
  3. Target Hit: Price reached a take profit level
  4. Stop Hit: Price reached the stop loss

Settings You Can Adjust

Detection Parameters

Setting What It Does Default When to Change
ATR Period for volatility Bars used to calculate ATR, normalizing all range-based thresholds to current volatility 14 Increase to 20+ for smoother ATR on noisy markets
Max Bars to Scan (history depth) Historical bars scanned on first load to display past patterns 3000 Increase for more history on higher timeframes
Min Bars Between Patterns Minimum gap between two consecutive signals 3 Increase to 5+ if signals cluster; decrease to 2 for more
Detection Preset Switches between Standard, Strict, and Custom modes PRESET_STANDARD Use Strict for higher-conviction setups
Quality Score Filter Enables the quality filter true Keep enabled for live trading
Min Quality (0.0-1.0) Minimum quality score a pattern must achieve to display 0.30 Raise to 0.50+ for fewer but stronger signals

Detection Preset Values

Parameter STANDARD STRICT
Min Range/ATR (Bar 2) 0.50 0.60
Min Body/ATR (Bar 2) 0.20 0.25
Min Relative Range 1.20 1.30
Min Body Ratio 0.40 0.45

Custom Threshold Parameters

Setting What It Does Default When to Change
[Custom] Min Range/ATR (Bar 2) Minimum bar 2 range size as a multiple of ATR 0.50 Increase to 0.65+ to require larger range expansion
[Custom] Min Body/ATR (Bar 2) Minimum bar 2 body size as a multiple of ATR 0.20 Increase to 0.30+ to require more substantial body structure
[Custom] Min Relative Range Minimum bar 2 range as a multiple of bar 1 range 1.20 Increase to 1.50 for more dramatic range expansion
[Custom] Min Body Ratio Minimum bar 2 body as a fraction of total range 0.40 Increase to 0.50 for cleaner candle structure
SL Buffer (xATR beyond pattern extreme) Offset placed beyond the pattern high/low 0.25 Increase to 0.35 on volatile instruments
Trend SMA Period Period for trend-related calculations if used 20 Increase to 30 for longer-term trend context

Settings Tips

  • Begin with the Standard preset and default quality threshold on your chosen symbol; observe at least two to three weeks of signals before adjusting
  • If Standard produces too many signals, raise Min Quality to 0.50 rather than switching to Strict — this preserves detection sensitivity while filtering out weaker examples
  • The range expansion gate (0.50× ATR Standard) allows moderate expansion; on volatile instruments, increase to 0.60 for more pronounced range dominance
  • Avoid cutting the SL buffer below 0.20×ATR — the pattern extreme is the logical invalidation point, and some retesting is normal before the move develops

Best Timeframes and Markets

  • H1 — Quality: High | Frequency: Medium | Best for: Day traders seeking clear range-expansion setups at intraday support and resistance; recommended starting point
  • H4 — Quality: High | Frequency: Lower | Best for: Swing traders who want well-formed Outside Bar patterns with strong follow-through potential
  • M15 — Quality: Medium | Frequency: High | Best for: Scalpers wanting frequent signals during active session hours
  • D1 — Quality: Highest | Frequency: Low | Best for: Position traders seeking textbook Outside Bar formations at major daily structure levels

Best Markets

  • XAUUSD (Gold): Outside Bar patterns on H1 and H4 frequently mark momentum continuation points, particularly during London and New York session crossovers
  • Major forex pairs (EURUSD, GBPUSD, USDJPY): Outside Bar formations are common after range breaks, especially near round numbers and session open prices
  • Indices (US30, NAS100): Outside Bar patterns near prior highs can mark continuation entry points after breakouts
  • Oil (USOIL): Strong Outside Bar formations appear after sharp upward or downward moves on H1 and H4

The indicator works on any symbol and timeframe. H1 with the Standard preset on XAUUSD is the recommended starting configuration.


Getting Started — Quick Setup

  1. Open MetaTrader 5 and load a chart (XAUUSD on H1 is a good starting point)
  2. In the Navigator panel (Ctrl+N), expand Indicators → Custom and locate OutsideBarTradingSystem
  3. Drag the indicator onto the chart
  4. In the settings dialog, select Detection Preset (Standard recommended for first use) and click OK — the indicator will scan history and display detected patterns immediately
  5. Observe the signals: green upward arrows indicate bullish Outside Bar patterns; red downward arrows indicate bearish patterns
  6. Check the quality score on each signal — focus on patterns scoring 0.50 or higher when starting out
  7. Optional: Enable alerts in the ALERTS section to receive notifications when new patterns form in real-time

All Features at a Glance

  • Automatic bullish and bearish Outside Bar two-candle detection on any symbol and timeframe
  • 4-gate structural detection: range engulfment, bar 2 range/ATR, bar 2 body/ATR, relative range and body ratio quality gates
  • 6-factor weighted quality scoring (range/ATR 0.20, relative range 0.20, CLV 0.20, body ratio 0.15, trend alignment 0.15, body color 0.10)
  • Trend context detection using 3-bar prior price action and directional analysis
  • 3 detection presets: Standard, Strict, Custom (user-defined thresholds)
  • Pending buy stop or sell stop entry at breakout level (not immediate)
  • Signal states and lifecycle tracking
  • Quality filter to suppress weak patterns below threshold
  • Extreme zone filter (overbought/oversold rejection)
  • Stoploss hunt filter (liquidity sweep validation)
  • Opposite signal filter (prevent conflicting signals)
  • Risk/Reward with 3 stop loss methods (Donchian Channel, ATR, Pattern)
  • Up to 4 take profit levels (TP1-TP4) at configurable R:R ratios
  • Donchian Channel trailing stop loss
  • MTF Scanner (up to 150 symbols × 8 timeframes)
  • Market structure analysis (BOS / CHOCH)
  • 4-channel alert system (popup, sound, push, email)
  • Signal statistics dashboard
  • Professional chart themes (Dark, Light, Custom)
  • EA signal buffers for automated trading

For detailed guides on each feature, see the MANUAL included with the indicator.


Common Questions

Q: What is the difference between Outside Bar and Inside Bar?

Inside Bar represents consolidation and indecision: bar 2's range is completely contained within bar 1's range (HIGH_2 <= HIGH_1 and LOW_2 >= LOW_1). Outside Bar represents expansion and commitment: bar 2's range completely contains bar 1's range (HIGH_2 > HIGH_1 and LOW_2 < LOW_1). Inside Bar often precedes a breakout; Outside Bar often confirms a breakout has begun.

Q: Why does the indicator use pending orders instead of immediate entry?

The Outside Bar's defining feature is that bar 2's range expands beyond bar 1's extremes — the expansion signal occurs at bar close, but the actual directional commitment and confirmation of continuation occurs when price breaks above (bullish) or below (bearish) that range. Waiting for the breakout ensures entry aligns with market consensus that the expansion is meaningful rather than entering speculatively at bar close.

Q: How do I distinguish bullish from bearish Outside Bars?

Bullish Outside Bars typically occur during uptrends with both bars closing higher (bullish body color) and are entered with buy stop orders above the high. Bearish Outside Bars typically occur during downtrends with both bars closing lower (bearish body color) and are entered with sell stop orders below the low. The indicator's direction filter and trend analysis detect this context automatically.

Q: What does "trend alignment" mean for Outside Bar?

The indicator checks the three bars before bar 1 of the potential pattern to establish whether an uptrend or downtrend is in place. If bars are making higher highs and higher lows, an uptrend is established; if making lower highs and lower lows, a downtrend is established. Bullish Outside Bars score higher when forming during confirmed uptrends; bearish Outside Bars score higher during downtrends. This context detection aligns signals with the continuation premise.

Q: Why does the indicator place breakout orders above the high instead of exactly at the high?

Buy stop orders are typically placed slightly above (typically HIGH_2 + 0.05×ATR) to ensure the order triggers cleanly on true breakout momentum rather than on minor wicks or bid/ask spread noise at the exact high. This buffer improves entry quality by requiring slightly more conviction before triggering.

Q: What if multiple patterns form close together?

If multiple Outside Bar patterns form on nearby bars, the spacing filter prevents them from all appearing as signals. The Min Bars Between Patterns setting (default: 3 bars) ensures that only the highest-quality signal is shown when patterns cluster. Adjust this setting if you prefer to see all patterns regardless of spacing.


What's New — Version 1.00

This is the initial release of OutsideBarTradingSystem. Key features include:

  • Outside Bar bullish and bearish two-candle detection using 4-gate structural validation
  • 6-factor weighted quality scoring with balanced focus on range expansion (0.40 weight combined) and structure quality
  • Trend context detection from 3-bar prior price action to distinguish bullish from bearish Outside Bars
  • Standard and Strict presets, plus fully customizable Custom threshold mode
  • Pending buy stop or sell stop entry at breakout level above/below the engulfing candle
  • 7-layer filter chain (Quality, Extreme Zone, Direction, Stoploss Hunt, Signal Zone, Market Structure, Opposite Signal)
  • Multi-timeframe scanner covering up to 150 symbols and 8 timeframes simultaneously
  • Automated Entry/SL/TP levels with Donchian Channel trailing stop
  • 4-channel alert system (popup, sound, push notification, email)
  • EA signal buffers enabling automated trading systems to consume Outside Bar signals via iCustom()
  • Professional chart themes (Dark, Light, Custom) for extended trading sessions

Getting Help

If you have questions or need support:


Ready to Start?

OutsideBarTradingSystem identifies the structural moment when price range expands beyond the prior bar's extremes, signaling renewed volatility and directional commitment. Attach the indicator to your chart, start with the Standard preset on XAUUSD H1, and observe how the range expansion aligns with the momentum moves you would identify manually.

Happy trading!

Ich Khiem Nguyen


OutsideBarTradingSystem 1.00 — Created 2026-02-24