Hammer Trading System - MANUAL

Hammer Trading System - MANUAL

26 February 2026, 16:23
Ich Khiem Nguyen
0
25

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


HammerTradingSystem 1.00

Bullish Reversal and Bearish Warning at Trend Turning Points

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

What is HammerTradingSystem?

HammerTradingSystem detects Hammer and Hanging Man candlestick patterns on your MetaTrader 5 charts automatically. The indicator checks every completed bar, evaluates it against six structural gates, scores surviving patterns with a weighted quality system, and displays only the setups that clear your minimum quality threshold. Entry levels, stop losses, and take profit targets are drawn directly on the chart so you can focus on the trade decision rather than the calculation.


What Are Hammer and Hanging Man Patterns?

The Hammer and Hanging Man share the same single-candle shape: a small body sitting near the top of the candle range, a long lower shadow extending well below the body, and little to no upper shadow. The difference between them is context — where in a trend this shape appears determines which signal it sends.

Bullish Hammer (Reversal Signal)

Appears after a downtrend. Sellers push price sharply lower during the session, but buyers step in and drive the close back up near the open, leaving a long lower shadow as evidence of rejected selling pressure. When this shape forms after at least two declining bars, the indicator classifies it as a Hammer — a potential bullish reversal signal. The longer the lower shadow relative to the candle range, the stronger the buyer commitment implied by the pattern.

Bearish Hanging Man (Warning Signal)

The same shape appearing after an uptrend tells a different story. Price has been rising, and the long lower shadow shows that sellers attempted to push price down during the session — buyers recovered by the close, but the attempt itself is a warning. Bulkowski's research places the Hanging Man at rank 87 out of 103 patterns with a 59% continuation rate, meaning it more often continues the uptrend than reverses it. HammerTradingSystem treats it as a bearish warning rather than a confirmed reversal, entering via Sell Stop only after price breaks below the pattern low.

Trend Context Detection

The indicator examines the three bars immediately before each candidate candle. If at least two of those three bars are declining (lower closes), the pattern is classified as a Hammer. If at least two of the three are rising (higher closes), it becomes a Hanging Man. When the context is ambiguous — neither trend reaching the two-bar threshold — the indicator defaults to Hammer classification, reflecting the pattern's more common bullish application.


How the Indicator Finds Patterns

The indicator evaluates each completed bar against six sequential gates. All six must pass for a signal to be generated.

  1. Lower shadow gate: The lower shadow must occupy at least the minimum required fraction of the total candle range (Standard: 35%, Strict: 45%). This confirms that meaningful selling pressure was rejected during the session.

  2. Body position gate: The midpoint of the body must sit at or above the minimum position threshold within the candle range (Standard: 50%, Strict: 60%). A body clustered near the top of the range is the defining characteristic of the Hammer shape.

  3. Upper shadow gate: The upper shadow must remain below the maximum allowed ratio of total range (Standard: 15%, Strict: 10%). A large upper shadow would indicate buyer rejection from above, which conflicts with the bullish reversal story.

  4. Range significance gate: The total candle range must equal or exceed the minimum multiple of ATR (Standard: 0.40×, Strict: 0.50×). This rejects tiny candles that form during low-volatility consolidation and carry little structural meaning.

  5. Shadow-to-body ratio gate: The lower shadow must be at least twice the body height (Nison criterion). This ensures the long lower shadow is not simply a result of a large body rather than genuine rejection.

  6. Doji exclusion gate: The body must be at least 0.02× ATR. A near-zero body would make this a Dragonfly Doji rather than a Hammer — the two patterns are structurally related but analytically distinct.

Only candles passing all six 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 importance to the pattern's structural integrity.

Quality Factors

Factor Weight What It Measures Ideal Range
QF-1: Lower Shadow Ratio 0.35 Proportion of candle range occupied by lower shadow [0.55, 0.90]
QF-2: Body Position 0.25 How high the body midpoint sits within the range [0.60, 1.00]
QF-3: Upper Shadow (inverted) 0.15 Absence of upper shadow — lower is better [0.60, 1.00]
QF-4: Range/ATR 0.10 Candle size relative to recent volatility [0.50, 2.00]
QF-5: Close vs Prior Range (inverted) 0.10 Close position within previous candle's range [0.60, 1.00]
QF-6: Relative Range 0.05 This candle's range compared to previous candle [0.80, 2.50]

QF-3 and QF-5 are inverted factors: for QF-3, a smaller upper shadow produces a higher score; for QF-5, a close in the lower portion of the previous candle's range (indicating downtrend context) produces a higher score.

Score Grades

  • Grade A (0.80 - 1.00) — Excellent: Strong structural alignment across all six factors
  • Grade B (0.60 - 0.79) — Good: Reliable setups with most factors scoring well
  • Grade C (0.40 - 0.59) — Average: Valid structure but weaker factor scores; use with additional confirmation
  • Grade D (0.20 - 0.39) — Below Average: Marginal setup; higher false signal risk
  • Grade F (0.00 - 0.19) — Poor: Avoid trading these signals

Quality Threshold

The default minimum quality is 0.30. You can raise this to filter for higher-conviction setups:

  • 0.50 - 0.60: Shows only the clearest patterns with strong shadow proportions and body positioning — fewer signals, higher per-signal quality
  • 0.20 - 0.30: Shows more signals including weaker structural examples — useful for studying the pattern or trading highly liquid markets
  • Tip: Run the indicator at the default 0.30 on your preferred symbol and timeframe for a few weeks before adjusting the threshold

What You See on the Chart

When a Hammer or Hanging Man pattern is detected and passes all filters, the indicator draws the following elements:

Signal Markers

  • Arrow icons: Blue upward arrows mark Hammer (bullish) patterns; orange downward arrows mark Hanging Man (bearish) patterns. Gray arrows indicate signals blocked by an active filter such as the Opposite Signal filter.
  • Quality labels: A numeric score (e.g., "0.68") 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 — Buy Stop above the pattern high (+ 0.05×ATR) for Hammers, or Sell Stop below the pattern low (- 0.05×ATR) for Hanging Men
  • Stop Loss line: A red horizontal line labeled "SL" — placed below the pattern low (- 0.25×ATR) for Hammers, or above the pattern high (+ 0.25×ATR) for Hanging Men
  • 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 the hammer candle, making it easy to identify which bar 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 above or below the signal candle update as the signal state changes — white for pending, yellow for active, green for target hit, red for stop hit

Signal Lifecycle

  1. Pending: Pattern detected, pending order not yet triggered
  2. Triggered: Entry price reached, trade is active
  3. Target Hit: Price reached a take profit level
  4. Stop Hit: Price reached the stop loss
  5. Cancelled: Signal invalidated before entry (reversed direction or bar closed against)

Settings You Can Adjust

Detection Parameters

Setting What It Does Default When to Change
ATR Period for volatility Bars used to calculate ATR, which normalizes all range-based thresholds to current volatility 14 Increase to 20+ for smoother measurement 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, preventing overlapping setups on the same move 5 Increase to 7-10 if signals cluster; decrease to 3 for more frequent signals
Detection Preset Switches between Standard (relaxed thresholds), Strict (tighter thresholds), and Custom (user-defined) PRESET_STANDARD Use Strict for higher-conviction setups; Custom to tune individual parameters
Quality Score Filter (pattern strength) Enables the quality filter — only patterns at or above InpMinQuality appear true Keep enabled for live trading; disable only for research
Min Quality (0.0-1.0, 0.30=relaxed) 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 Lower Shadow Ratio 0.35 0.45
Min Body Position 0.50 0.60
Max Upper Shadow Ratio 0.15 0.10
Min Range/ATR 0.40 0.50

Custom Threshold Parameters

Setting What It Does Default When to Change
[Custom] Min Lower Shadow Ratio (Std=0.35, Strict=0.45) Minimum lower shadow as a fraction of total range 0.35 Increase to 0.50+ for more pronounced shadows; decrease for more signals
[Custom] Min Body Position (Std=0.50, Strict=0.60) Minimum body midpoint position within range 0.50 Increase to 0.65 for bodies firmly at the top of range
[Custom] Max Upper Shadow Ratio (Std=0.15, Strict=0.10) Maximum upper shadow as a fraction of total range 0.15 Decrease to 0.08 for near-perfect hammer shape
[Custom] Min Range/ATR (Std=0.40, Strict=0.50) Minimum candle range as a multiple of ATR 0.40 Increase to 0.60+ to require larger, more significant candles
Entry Buffer (xATR for pending order) Additional buffer added to entry level beyond the pattern high or low 0.05 Increase to 0.10 on volatile markets to reduce false triggers
SL Buffer (xATR below pattern Low) Buffer below the pattern low (Hammer) or above pattern high (Hanging Man) 0.25 Increase to 0.35 on volatile instruments to reduce stop-outs

Settings Tips

  • Begin with default settings and observe several dozen signals on your chosen symbol and timeframe before making adjustments
  • If the Standard preset produces too many signals, switch to Strict or raise Min Quality to 0.50
  • If Strict produces too few signals, return to Standard and consider raising the quality threshold instead of loosening the detection gates
  • On low-volatility instruments, the Min Range/ATR gate at 0.40 may be sufficient; on high-volatility instruments like XAUUSD, consider raising it to 0.50 so small insignificant candles are excluded
  • The SL Buffer of 0.25×ATR is wider than some comparable patterns because Hammer lows occasionally get retested before the reversal takes hold — avoid cutting this too tight

Best Timeframes and Markets

  • M15 — Quality: Medium | Frequency: High | Best for: Scalpers who want intraday Hammer signals at session open and close periods
  • H1 — Quality: High | Frequency: Medium | Best for: Day traders seeking clear reversal setups at intraday support and resistance levels
  • H4 — Quality: High | Frequency: Lower | Best for: Swing traders who want well-formed Hammer patterns with higher follow-through potential
  • D1 — Quality: Highest | Frequency: Low | Best for: Position traders seeking textbook Hammer signals at major daily support levels

Best Markets

  • XAUUSD (Gold): Hammer patterns at support levels on H1 and H4 frequently mark intraday reversal points, particularly during London and New York session overlaps
  • Major forex pairs (EURUSD, GBPUSD, USDJPY): Solid Hammer signals form on H1 and H4, especially near round numbers, daily pivots, and prior session highs/lows
  • Indices (US30, NAS100): Both Hammer and Hanging Man formations appear at structural turning points on H1 and H4; Hanging Man signals at prior resistance highs can be particularly informative
  • Oil (USOIL): Hammer patterns form at support levels after sharp selloffs — best observed on H1 and H4

The indicator works on any symbol and timeframe. The combinations listed above tend to produce patterns with stronger structural quality scores.


Getting Started — Quick Setup

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

All Features at a Glance

  • Automatic Hammer (bullish) and Hanging Man (bearish) single-candle pattern detection on any symbol and timeframe
  • 6-gate structural detection: lower shadow ratio, body position, upper shadow limit, range/ATR, shadow-to-body ratio, Doji exclusion
  • 6-factor weighted quality scoring (lower shadow 0.35, body position 0.25, upper shadow inverted 0.15, range/ATR 0.10, close vs prior range inverted 0.10, relative range 0.05)
  • Trend context detection using 3-bar prior price action: downCount >= 2 → Hammer, upCount >= 2 → Hanging Man
  • 3 detection presets: Standard, Strict, Custom (user-defined thresholds)
  • Signal states and lifecycle tracking (Pending → Active → Finished)
  • 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 a Hammer and a Hanging Man?

Both patterns have the same candle shape — small body near the top of the range with a long lower shadow. The distinction is context: a Hammer forms after a downtrend (bullish reversal signal) and a Hanging Man forms after an uptrend (bearish warning). HammerTradingSystem determines which type it is by checking whether the 3 bars before the pattern show at least 2 declining or 2 rising closes.

Q: Why is the Hanging Man described as a "warning" rather than a confirmed reversal?

Thomas Bulkowski's research places the Hanging Man at rank 87 out of 103 candlestick patterns, with price continuing the prior uptrend 59% of the time after the pattern forms. This means a Hanging Man is more likely to be a temporary pause in the uptrend than a confirmed top. The indicator generates a Sell Stop entry below the pattern low — if price never breaks that low, the signal expires without triggering, which naturally filters many false tops.

Q: What is the difference between Standard and Strict presets?

Standard uses relaxed thresholds (lower shadow >= 35% of range, body position >= 50%, upper shadow <= 15%, range >= 0.40×ATR) and passes a higher percentage of candidate candles. Strict tightens all four thresholds (45%, 60%, 10%, 0.50×ATR respectively) and accepts only the most clearly-formed patterns. Start with Standard and switch to Strict if you prefer fewer but more textbook-quality signals.

Q: Why does the SL buffer default to 0.25×ATR rather than a smaller value?

Hammer lows are frequent targets for stop hunts — price briefly drops below the pattern low before reversing upward. A buffer of 0.25×ATR provides enough clearance to absorb those brief excursions without being so wide that it materially changes the risk profile. On markets where stop hunts are common (XAUUSD, major indices), you may consider increasing this to 0.30×ATR.

Q: What if the context is ambiguous — neither a clear uptrend nor downtrend?

If fewer than 2 of the 3 prior bars are declining and fewer than 2 are rising, the indicator classifies the pattern as a Hammer (bullish) by default. This reflects the Hammer's more common application in the literature and the fact that bullish reversals on ambiguous context carry a higher continuation risk — always combine with your own market structure analysis in these cases.

Q: How do I reduce the number of false signals?

Raise the Min Quality threshold to 0.50 or higher to see only stronger patterns. You can also switch to the Strict Detection Preset, enable the Direction Filter to restrict signals to the dominant trend direction, or enable the Extreme Zone Filter to block signals near overbought/oversold channel extremes.


What's New — Version 1.00

This is the 1.00 release of HammerTradingSystem. Key features include:

  • Hammer and Hanging Man detection using 6-gate structural validation with Nison shadow-to-body criterion
  • 6-factor weighted quality scoring using lower shadow dominance, body positioning, upper shadow absence, range significance, prior range context, and relative candle size
  • Trend context detection from 3-bar prior price action to distinguish Hammers from Hanging Men
  • Standard and Strict presets, plus fully customizable Custom threshold mode
  • 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 Hammer signals via iCustom()
  • Professional chart themes (Dark, Light, Custom) for extended trading sessions

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?

HammerTradingSystem is built to identify Hammer and Hanging Man patterns automatically, so you can concentrate on evaluating the trade rather than searching for the setup. Attach the indicator to your chart, start with the default settings, and observe how the signals line up with your own market structure analysis.

Happy trading!

Ich Khiem Nguyen


HammerTradingSystem 1.00 — Created 2026-02-24