Counter attack Trading System

Counter attack Trading System

22 February 2026, 16:56
Ich Khiem Nguyen
0
57

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

Counterattack Trading System 

Gap Reversal at Matching Closes — 2-Bar Sentiment Shift Detection

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

What is Counterattack Trading System?

Counterattack Trading System helps you spot Counterattack Line patterns on your MetaTrader 5 charts — automatically. A Counterattack Line is a powerful 2-bar gap reversal signal that occurs when the market opens with a gap against the prevailing trend, then closes at the exact same level as the prior bar's close. The indicator scans every candle pair, filters out weak setups, and shows you only the best trading opportunities with clear entry points, stop losses, and profit targets already calculated. It works on any market and any timeframe, giving you more time to focus on your trading decisions.


What Are Counterattack Patterns?

Counterattack Lines are reversal patterns that appear when market momentum shifts dramatically in a single bar. The defining characteristic is a gap opening followed by a close that matches the previous candle's close — proving the counterattacking side has fully absorbed the trend's momentum.

Bullish Counterattack (Bullish Reversal)

Appears at the bottom of a downtrend. The first candle is bearish, continuing the selling pressure. The second candle opens with a gap DOWN (below the first candle's close), showing extreme bearish sentiment. But then buyers step in aggressively, pushing price all the way back up to close at the same level as the first candle's close. This dramatic reversal from gap-down to matching-close proves that bulls have fully neutralized the bears.

Bearish Counterattack (Bearish Reversal)

Appears at the top of an uptrend. The first candle is bullish, continuing the buying pressure. The second candle opens with a gap UP (above the first candle's close), showing extreme bullish sentiment. But then sellers step in aggressively, pushing price all the way back down to close at the same level as the first candle's close. This shows that bears have completely absorbed the buying pressure.

When you see these patterns forming near important support or resistance levels, they become even more reliable signals for potential trend reversals.


How the Indicator Finds Patterns

The indicator scans your charts in real-time and checks each potential pattern against multiple quality requirements:

  1. Gap Detection — Checks that the second candle opens with a meaningful dislocation against the trend direction (at least 0.08x ATR — works on both gapped and continuous markets)
  2. Close Matching — Verifies both candles close at approximately the same price level (within 0.25x ATR tolerance)
  3. Body Validation — Confirms both candles have substantial bodies (at least 0.20x ATR each) — no doji or indecision bars
  4. Range Check — At least one candle must have significant range (0.40x ATR minimum)

Only patterns that pass all these checks appear on your chart, so you don't waste time on weak or invalid setups.


Quality Score — How Good Is the Pattern?

Every pattern gets a quality score from 0% to 100%, like a grade on a test. This helps you focus on the best trading opportunities.

What the Score Means

The indicator evaluates 6 factors to calculate the score. The most important factor is close match precision (25% weight) — tighter convergence between the two closes means a stronger signal. Gap size and direction change each contribute 20%, rewarding larger gaps and confirmed opposite-body candles. Relative body size (15%) checks that both candles have balanced bodies. Doji check (10%) penalizes indecisive candles. Range significance (10%) rewards candles with meaningful range relative to volatility.

Grade Score Range Quality Level
A 80-100% Excellent — Best signals
B 60-79% Good — Reliable setups
C 40-59% Average — Needs confirmation
D 20-39% Below Average — Risky
F 0-19% Poor — Avoid

Quality Threshold Setting

By default, the indicator only shows patterns scoring 30% or higher. You can adjust this in the settings:

  • Raise to 50-60%: See only the best signals (fewer but higher quality)
  • Lower to 20%: See more signals (more frequent but mixed quality)
  • Tip: Start with the default 30% and adjust based on your backtest results

What You See on the Chart

When the indicator detects a Counterattack pattern, it draws everything you need to know directly on the chart:

Signal Markers

  • Arrow icons: Green up arrow for bullish counterattack, red down arrow for bearish counterattack
  • Quality labels: Score displayed next to the pattern (e.g., "Q:72%")

Trading Lines

  • Entry line: Blue horizontal line at the pending entry level (above pattern high for buy, below pattern low for sell)
  • Stop Loss line: Red line at the opposite pattern extreme plus ATR buffer
  • Take Profit lines: Green lines at TP1 (1R), TP2 (1.5R), TP3 (2R), TP4 (3R) with pip labels

Visual Zones

  • Pattern highlight: Both candles colored (green for bullish, red for bearish) with gray for cancelled signals
  • Zone fill: Shaded rectangles showing risk zone (entry to SL) and reward zone (entry to TP4)

Signal Lifecycle

Signals progress through different states, shown by changing colors and tracking dots:

  1. Pending: Pattern just detected, waiting for entry confirmation
  2. Triggered: Entry price reached, trade is active
  3. Target Hit: Price reached take profit level (signal turns green)
  4. Stop Hit: Price hit stop loss (signal turns red)
  5. Cancelled: Signal invalidated before entry (signal disappears or grays out)

You can watch your signals evolve in real-time without opening any menus or panels.


Settings You Can Adjust

Here are the main settings that control how the indicator finds and displays Counterattack patterns:

Setting What It Does Default When to Change It
ATR Period for volatility Controls the volatility measurement period for all ATR-based thresholds 14 Increase to 20 for smoother readings on volatile markets
Min Gap (xATR, 0.08=8% dislocation) Minimum gap/dislocation between candles required for detection 0.08 Increase to 0.20+ for stocks with larger gaps; default works for forex/XAUUSD
Close Match Tolerance (xATR, 0.25=25%) Maximum distance between both closes 0.25 Decrease to 0.15 for precision; increase to 0.30 for more signals
Min Body/ATR (both candles, 0.20) Both candles must have body at least this size 0.20 Raise to 0.30 for strict filtering; lower to 0.15 for more signals
Min Range/ATR (at least 1 bar, 0.40) At least one candle needs this range 0.40 Raise to 0.60 for higher conviction; lower for more signals
SL Buffer (xATR beyond pattern extreme) Extra distance added to stop loss 0.10 Increase for volatile markets; decrease for tight risk control
Entry Buffer (xATR for pending) Distance beyond pattern extreme for pending order 0.05 Keep small for quick fills; increase to avoid fakeouts
Quality Score Filter (pattern strength) Enable/disable quality filter ON Keep enabled for best results
Min Quality (0.0-1.0, 0.30=relaxed) Minimum quality score to show signal 0.30 Raise to 0.50 for fewer but better signals

Settings Tips

  • Start with all default settings — they are pre-tuned for forex and XAUUSD (continuous markets)
  • On markets with natural gaps (stocks, indices), increase the gap threshold to 0.20+ ATR for higher-quality signals
  • The default gap threshold (0.08 ATR) detects session dislocations on forex/crypto where true gaps are rare
  • Always backtest any setting changes before using them on a live account

Best Timeframes and Markets

Timeframe Signal Quality Signal Frequency Best For
D1 (Daily) Highest Low (2-5/month) Swing traders, best gap quality on stocks/indices
H4 High Moderate (5-10/month) Intraday swing, good gap proxy on forex
H1 Moderate Moderate-High Active traders, use with stricter quality filter
W1 (Weekly) Highest Very Low (1-2/month) Position traders, strongest conviction signals

Best Markets

  • Stock Indices (US30, NAS100, SPX500): Natural overnight gaps make counterattack patterns highly reliable on D1/W1
  • Commodities (XAUUSD, Oil): Session gaps create genuine counterattack setups, especially on H4 and D1
  • Forex Majors (EURUSD, GBPUSD, USDJPY): Use ATR dislocation as gap proxy — works on H1, H4 with adjusted thresholds
  • Cryptocurrency: 24/7 market but weekend gaps occur — effective on D1 timeframe

The indicator works on any symbol and timeframe, but these combinations tend to produce the most reliable signals.


Getting Started — Quick Setup

Follow these steps to start using Counterattack Trading System:

  1. Open MetaTrader 5 and load your preferred chart (we recommend starting with a stock index on D1 or XAUUSD on H4)
  2. In the Navigator panel (Ctrl+N), expand "Indicators" and find "CounterattackTradingSystem"
  3. Drag it onto your chart
  4. A settings window appears — click OK to use the default settings (they are pre-tuned for general use)
  5. The indicator will scan historical bars and display any detected counterattack patterns
  6. Watch for new signals as bars complete — the indicator will alert you automatically
  7. Optional: Enable Push Notifications in the Alerts section for mobile alerts

That's it! The indicator is now scanning your charts automatically and will alert you when high-quality Counterattack patterns appear.


All Features at a Glance

Pattern-Specific Features

  • Gap detection with ATR-scaled thresholds that adapt to market volatility
  • Close-match validation ensuring both candles converge at the same price level
  • 6-factor weighted quality scoring (gap, direction, close match, body, doji, range)
  • Pending entry mode (Buy Stop / Sell Stop) for breakout confirmation
  • Pattern-specific stop loss at candle extremes plus configurable ATR buffer

The following professional-grade features are available across all our indicators:

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.

Common Questions

Q: Why are counterattack signals rare on forex charts?

The default settings (0.08 ATR gap threshold) are already optimized for forex and XAUUSD, detecting session dislocations as gap-equivalent moves. If signals are still rare on your specific pair, try lowering the Min Gap to 0.05 or increasing Close Match Tolerance to 0.30. Stock indices and commodities naturally produce more gaps and will generate more frequent signals.

Q: How is the Counterattack Line different from Engulfing patterns?

Both are 2-bar reversal patterns, but the mechanism is different. An Engulfing pattern has the second candle's body completely engulfing the first — showing overwhelming force. A Counterattack Line has a gap opening followed by a close that matches the first bar's close — showing absorption of momentum. The gap is the key differentiator.

Q: Why does the stop loss seem far from entry?

The indicator places the stop loss at the opposite extreme of the 2-bar pattern plus an ATR buffer. Since counterattack patterns involve a gap, the overall pattern range can be wide. You can switch to Donchian Channel or ATR-based stop loss in the Risk/Reward settings for potentially tighter stops. Always ensure the reward:risk ratio justifies the trade.

Q: Can I use this on lower timeframes like M15?

Yes, the default settings work on M15 and above. Lower timeframes will detect more dislocation-based signals during session transitions (London/NY open). For best results, use H1 or above. If signals are too frequent on M15, raise the quality threshold to 50%+ to filter out weak setups.


What's New — Version 1.00

This is the v1.00 release of Counterattack Trading System. Key features include:

  • Automatic detection of Bullish and Bearish Counterattack Line patterns on all timeframes
  • Gap detection with ATR-normalized thresholds for both gapped and continuous markets
  • Close-match validation with configurable tolerance
  • 6-factor quality scoring from 0-100%
  • Seven independent filter systems to reduce false signals
  • Pending entry mode (Buy Stop / Sell Stop) with configurable entry buffer
  • Multi-timeframe scanner monitoring up to 150 symbols across 8 timeframes
  • Donchian Channel trailing stop with auto-activation
  • Fully customizable alerts and notifications
  • EA signal buffers for algorithmic trading integration
  • Theme support for light and dark charts

Getting Help

If you have questions or need support:

I'm committed to helping you get the most out of this indicator.


Ready to Start?

Counterattack Trading System is designed to save you time and help you find high-probability gap reversal patterns automatically. Attach the indicator to your chart and start with the default settings — you can fine-tune everything later as you get comfortable with how it works.

Happy trading!

Ich Khiem Nguyen


Counterattack Trading System v1.00 — Created 2026-02-22