
| 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
GravestoneDojiTradingSystem 1.00
Bearish Reversal at Market Tops
Author: Ich Khiem Nguyen | MQL5: https://www.mql5.com/en/users/khiemni/seller
What is GravestoneDojiTradingSystem?
GravestoneDojiTradingSystem helps you spot Gravestone Doji patterns on your MetaTrader 5 charts — automatically. The indicator scans every candle, filters out weak setups, and shows you only the best bearish reversal 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 instead of searching for patterns.
What Are Gravestone Doji Patterns?
The Gravestone Doji is a single-candle reversal pattern that appears at market tops after uptrends. Its distinctive inverted T-shape tells a story of rejected strength: buyers drive price sharply higher during the candle (creating a long upper shadow), but sellers step in and reclaim control by the close. The result is a candle with open, low, and close clustered near the bottom, with a long upper shadow indicating strong rejection of higher prices. This represents a shift from buying pressure to selling interest, signaling a potential bearish reversal.
Bearish Gravestone Doji (Reversal)
Appears after an uptrend as a reversal signal. The prior candle must be bullish (close above open), confirming upward momentum. Then the Gravestone Doji forms: open near the low, close near the open (tight body), and a long upper shadow extending significantly above both. This inverted T-shape shows buyers initially won (long upper shadow), but sellers rejected those high prices and pulled the close back to the bottom. When this pattern appears at key resistance levels or after significant buying pressure, it becomes a powerful signal for potential bearish reversal and trend change.
The longer the upper shadow relative to the body, the stronger the seller rejection of higher prices. Quality Gravestone Doji patterns often precede significant downtrends, making them valuable entry points for traders seeking early reversal signals.
How the Indicator Finds Patterns
The indicator scans your charts in real-time and checks each potential pattern against multiple quality requirements:
- Scans each completed bar and checks if the current candle forms a Gravestone Doji shape — open and close must be clustered near the low (tiny body), with a long upper shadow extending far above the body
- Verifies the prior bar is bullish (close above open) to confirm uptrend context and establish that buyers controlled the market before the doji formed, ensuring you’re catching a true reversal rather than noise in a consolidation
- Confirms the upper shadow is significantly longer than both the body and lower shadow — the ratio of upper shadow to candle range must exceed the minimum threshold, proving strong seller rejection of higher prices
- Applies quality scoring based on body tightness (how doji-like), upper shadow strength, lower shadow cleanliness, prior bullish confirmation, range significance relative to volatility, and prior candle engagement — only patterns meeting the minimum quality threshold appear on your chart
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.00 to 1.00. This helps you focus on the best trading opportunities.
What the Score Means
The indicator evaluates six aspects of each Gravestone Doji pattern. It checks how tight the body is (true doji quality), how long the upper shadow is compared to the body (seller rejection strength), whether the lower shadow is minimal (clean inverted T-shape), if the prior bar was strongly bullish (uptrend confirmation), whether the candle range is significant relative to recent volatility, and how much of the prior 10-bar move the doji range represents (prior candle engagement). Each factor is weighted by importance, and the combined score tells you at a glance how textbook-perfect the pattern is.
- Grade A (0.80 – 1.00) — Excellent: Best signals, highest probability reversals
- Grade B (0.60 – 0.79) — Good: Reliable reversal setups worth trading
- Grade C (0.40 – 0.59) — Average: Needs additional confirmation from price action
- Grade D (0.20 – 0.39) — Below Average: Risky, use with caution
- Grade F (0.00 – 0.19) — Poor: Avoid trading these signals
Quality Threshold Setting
By default, the indicator only shows patterns scoring 0.30 or higher. You can adjust this in the settings:
- Raise to 0.50-0.60: See only the best signals (fewer but higher quality reversals)
- Lower to 0.15-0.25: See more signals (more frequent but mixed quality)
- Tip: Start with the default 0.30 and adjust based on your backtest results
What You See on the Chart
When the indicator detects a Gravestone Doji pattern, it draws everything you need to know directly on the chart:
Signal Markers
- Arrow icons: Red downward arrows mark the Gravestone Doji pattern location — placed below the doji candle to indicate a bearish reversal signal. Gray arrows indicate signals blocked by an active filter.
- Quality labels: A numeric score (e.g., “0.74”) appears near each signal, showing how strongly the pattern scored across all six quality factors
Trading Lines
- Entry line: An orange horizontal line placed just below the pattern low (entry buffer = 0.05 × ATR), showing the exact Sell Stop trigger level
- Stop Loss line: A red horizontal line above the pattern high (SL buffer = 0.10 × ATR), clearly labeled “SL” — this is where your protective stop goes
- Take Profit lines: Up to four green horizontal lines below the entry level, labeled TP1 through TP4, calculated at 0.5R, 1.0R, 1.5R, and 2.0R reward multiples respectively
Visual Zones
- Pattern highlight: A shaded rectangle spans the doji candle area, helping you instantly see which candle forms the Gravestone Doji signal. Risk zone between entry and SL is shaded in red; reward zones between entry and each TP level are shaded in progressively lighter green.
- Tracking dots: Small colored dots trail below the signal candle and change color as the signal evolves — white for pending, yellow for triggered/active, green for target hit, red for stop hit
Signal Lifecycle
Signals progress through different states, shown by changing colors and tracking dots:
- Pending: Pattern just detected, waiting for entry confirmation
- Triggered: Entry price reached, trade is active
- Target Hit: Price reached take profit level (signal turns green)
- Stop Hit: Price hit stop loss (signal turns red)
- 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 Gravestone Doji patterns:
| Setting | What It Does | Default | When to Change It |
|---|---|---|---|
| ATR Period for volatility | Number of bars used to calculate ATR (Average True Range), which normalizes all thresholds to current market volatility | 14 | Increase to 20+ for smoother volatility measurement on noisy markets; decrease for faster response |
| Max Bars to Scan (history depth) | How many historical bars the indicator scans on first load to find and display past patterns | 3000 | Increase for more history on higher timeframes; decrease to speed up loading |
| Min Bars Between Patterns | Minimum gap between two consecutive detected signals, preventing overlapping signals on the same move | 3 | Increase to 5-7 if signals cluster too closely; decrease to 1-2 to allow more signals |
| Detection Preset | Switches between Standard (relaxed, ~36% pass rate), Strict (tight criteria, ~10% pass rate), and Custom (user-defined) threshold sets | PRESET_STANDARD | Switch to Strict for higher conviction reversals; use Custom to fine-tune individual parameters |
| Quality Score Filter (pattern strength) | Enables the quality filter — only patterns scoring at or above InpMinQuality will appear on the chart | true | Disable only for study/research purposes; keep enabled for live trading |
| Min Quality (0.0-1.0, 0.30=relaxed) | Minimum quality score a pattern must achieve to be displayed | 0.30 | Raise to 0.50+ to see fewer but stronger signals; lower to 0.20 for more frequent signals on liquid markets |
| [Custom] Max Body Ratio (Std=0.15, Strict=0.10) | Maximum allowed body size as a ratio of total candle range — lower means tighter, more doji-like bodies | 0.15 | Decrease to 0.10 for stricter doji definition; increase to 0.20 on choppy markets where perfect dojis are rare |
| [Custom] Min Upper Shadow Ratio (Std=0.50, Strict=0.65) | Minimum upper shadow size as a ratio of total candle range — controls how pronounced the inverted T-shape must be | 0.50 | Increase to 0.65-0.70 for stronger rejection signals; keep lower (0.40-0.50) on intraday for more signals |
| [Custom] Max Lower Shadow Ratio (Std=0.25, Strict=0.15) | Maximum allowed lower shadow as a ratio of total candle range — controls inverted T-shape cleanliness | 0.25 | Decrease to 0.15 for cleaner inverted T-shapes; increase to 0.35 if signals are too rare on volatile markets |
| [Custom] Min Range/ATR (Std=0.30, Strict=0.50) | Minimum candle range as a multiple of ATR — ensures the doji represents meaningful price movement | 0.30 | Increase to 0.50+ for larger, more significant rejections; keep lower (0.20-0.30) on tight-range days |
| [Custom] Close Match ATR (Std=0.30, Strict=0.20) | Maximum distance from close to low, expressed as ATR multiples — measures how near-bottom the close is | 0.30 | Decrease to 0.20 for tighter close-to-low matching (stricter doji); increase to 0.40 if signals are rare |
| SL Buffer (xATR above pattern High) | Extra buffer added above the pattern high when placing the stop loss, in ATR multiples | 0.10 | Increase to 0.15-0.20 on volatile markets to avoid premature stop-outs; decrease on calmer markets for tighter risk |
Settings Tips
- Start with all default settings and let the indicator run for a few days to see how it performs on your preferred market and timeframe
- If you get too many signals, switch the Detection Preset to Strict or raise the Min Quality threshold to 0.50
- If signals are too rare, keep the Detection Preset at Standard and consider raising the Max Body Ratio to 0.20 or lowering the Min Upper Shadow Ratio to 0.45
- On very choppy markets, increase the Min Range/ATR threshold to 0.50 so only significant rejections are detected
- Always backtest any setting changes before using them on a live account
Best Timeframes and Markets
Recommended Timeframes
- M15 — Quality: Medium | Frequency: High | Best for: Scalpers who want frequent intraday Gravestone Doji reversals on active sessions
- H1 — Quality: High | Frequency: Medium | Best for: Day traders who want clear intraday reversal setups, especially on XAUUSD at daily pivots
- H4 — Quality: High | Frequency: Lower | Best for: Swing traders who want well-formed doji reversals with strong follow-through potential
- D1 — Quality: Highest | Frequency: Low | Best for: Position traders seeking textbook-quality reversal signals at major daily resistance levels
Best Markets
- XAUUSD (Gold): Strong reversal behavior at resistance levels on H1 and H4 — Gravestone Doji patterns at key support-turned-resistance often precede significant selloffs
- Major forex pairs (EURUSD, GBPUSD, USDJPY): Good signal quality on H1 and above, especially at round numbers and daily pivots where seller pressure clusters
- Indices (US30, NAS100): Reversal patterns are common at resistance zones; best on H1 and H4 where daily structure is preserved
- Oil (USOIL): Gravestone Doji patterns form frequently at resistance levels after sharp rallies — best on H1 and H4
The indicator works on any symbol and timeframe, but these combinations tend to produce the most reliable reversal signals.
Getting Started — Quick Setup
Follow these steps to start using GravestoneDojiTradingSystem:
- Open MetaTrader 5 and load your chart (recommended: XAUUSD on H1 or H4 for the clearest initial signals)
- In the Navigator panel (Ctrl+N), expand ‘Indicators’ → ‘Custom’ and find GravestoneDojiTradingSystem
- Drag the indicator onto your chart
- In the settings dialog, select your preferred Detection Preset (Standard recommended for beginners) and click OK to apply — the indicator will scan history and display detected patterns immediately
- Watch for new signals forming in real-time — red-colored doji candles with downward arrows indicate Gravestone Doji patterns; check the quality score label to gauge signal strength
- After observing several signals, adjust the Min Quality threshold if needed: raise it if you’re seeing too many marginal setups, lower it if signals are too infrequent
- Optional: Enable alerts in the ALERTS section to get popup or push notifications for new signals so you never miss a reversal setup
That’s it! The indicator is now scanning your charts automatically and will alert you when high-quality Gravestone Doji patterns appear.
All Features at a Glance
- Automatic Gravestone Doji bearish reversal pattern detection on any symbol and timeframe
- 6-factor weighted quality scoring (doji quality 1.00, upper shadow 0.85, lower shadow 0.70, direction change 0.90, range/ATR 0.60, range engulfing 0.50)
- 3 detection presets: Standard (~36% pass rate), Strict (~10% pass rate), Custom (user-defined thresholds)
- Configurable prior bar bullish requirement to confirm uptrend context before accepting a signal
- Tight body detection with configurable body ratio thresholds
- Signal states and lifecycle tracking (Pending → Active → Finished)
- Quality filter to reject 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, ATR, Pattern)
- Up to 4 take profit levels (TP1-TP4)
- 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: Why is this pattern bearish only?
The Gravestone Doji is inherently a bearish reversal pattern — the long upper shadow plus tight body at the bottom show seller rejection of higher prices and a shift in momentum toward the downside. The bullish equivalent would be a Dragonfly Doji or different pattern entirely. This indicator focuses on Gravestone Doji as a bearish entry signal.
Q: What’s the difference between Standard and Strict presets?
Standard allows more signals (~36% of candidates pass) with relaxed thresholds — ideal when you want more trading opportunities or are trading on intraday timeframes where perfect dojis are less common. Strict uses tighter specifications (~10% pass rate) for higher conviction reversals. Start with Standard and switch to Strict if you’re getting too many signals or prefer fewer, higher-quality setups.
Q: How do I reduce the number of false signals?
Enable the Quality Filter (default 0.30) and raise it to 0.50+ for fewer but stronger signals. You can also switch to the Strict Detection Preset, decrease the Max Body Ratio to 0.10 for stricter doji definition, increase the Min Upper Shadow Ratio for stronger rejections, or enable the Direction Filter to only accept signals that align with the overall trend.
Q: Why does the stop loss sometimes seem wide?
The SL is placed above the pattern high plus an ATR buffer (default 0.10 × ATR) to account for normal intrabar retracements and market noise. You can switch to the ATR-based SL method in settings for tighter stops, but be aware this may increase false stop-outs on volatile instruments like XAUUSD. The Donchian Channel method adapts SL to recent price structure and is a good middle ground.
Q: What if I don’t see many Gravestone Doji patterns?
Gravestone Doji patterns are less frequent than other candlestick patterns because the requirements are strict (tight body + long upper shadow + prior bullish bar). This is actually a good sign — it means you’re seeing quality reversals rather than noise. If you need more signals, lower the Min Quality threshold to 0.20 or switch to intraday timeframes (M15, H1) where more reversals occur. You can also adjust the Max Body Ratio to 0.20 on choppy days.
Q: How does the prior bar bullish requirement work?
The indicator checks that the bar immediately before the Gravestone Doji is bullish (close above open) to confirm uptrend context. This ensures you’re catching a true reversal after established buying, not a random doji in sideways consolidation. You can disable this requirement in settings if you want to catch reversals during range-bound trading as well.
What’s New — Version 1.00
This is the 1.00 release of GravestoneDojiTradingSystem. Key features include:
- Gravestone Doji bearish reversal pattern detection across all timeframes and symbols
- 6-factor quality scoring system evaluating body tightness, upper shadow strength, lower shadow cleanliness, prior uptrend confirmation, range significance, and prior candle engagement
- Standard and Strict detection presets, plus fully customizable threshold mode
- Prior bar bullish confirmation to ensure reversal context
- 7-layer filter system (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 trading levels with Donchian Channel trailing stop
- 4-channel alert system (popup, sound, push notification, email)
- EA signal buffers enabling automated trading systems to consume Gravestone Doji signals directly
- Professional chart themes (Dark, Light, Custom) for comfortable long-session use
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?
GravestoneDojiTradingSystem is designed to save you time and help you find high-probability Gravestone Doji 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
GravestoneDojiTradingSystem 1.00 — Created 2026-02-23
