Gold Price Action Monitor
- 지표
- 버전: 1.20
- 활성화: 5
A self-contained analytical utility for discretionary Gold (XAUUSD) traders. It detects completed-candle price-action patterns across M1, M5, and M15, plots non-repainting markers, and notifies you across three alert channels.
This is a monitoring tool. It does not place, modify, or close any orders — there is no trading, martingale, grid, or hedging logic of any kind. It is built to sit alongside your own analysis and risk management as a decision-support layer.
Core Technical Features
Multi-Timeframe Detection Engine (M1 / M5 / M15)
Each enabled timeframe is tracked as an independent stream. On every tick the engine performs only a single bar-timestamp comparison per timeframe to detect when a new bar has opened; the full pattern evaluation then runs once, on the candle that just closed — never on the forming candle. Three direct consequences:
- No repaint. Only completed candles are ever evaluated and marked.
- Negligible CPU load between bars. Heavy series reads happen only at a bar transition, not on every tick.
- Chart-independent. Detection is decoupled from the chart's own period, so behavior is identical whether the EA is attached to an M1 or an H1 chart.
Pinbar Detection — Shadow-to-Range Geometry
For the last closed candle the tool computes the total range R = High − Low, the upper shadow = High − max(Open, Close), and the lower shadow = min(Open, Close) − Low. A candle qualifies as a bullish pinbar when the lower shadow ≥ R × ratio (default 0.66, ~two-thirds of the whole candle), and as a bearish pinbar when the upper shadow ≥ R × ratio. Because one shadow must occupy roughly two-thirds of the range, the body and the opposing wick are mathematically forced into the remaining third — this enforces a genuine rejection wick rather than an arbitrary candle. The ratio is adjustable (0.50–0.95).
Engulfing Detection — Body-to-Body Comparison
The engulfing test is body-relative, not range-relative. Using the last two closed candles, it requires (1) the prior candle to be the opposite color, (2) the current real body to fully envelop the prior real body via Open/Close containment, and (3) the current body to be at least InpEngulfBodyRatio × the prior body (default 1.0). Raising the ratio (e.g. 1.5) isolates momentum-dominant engulfings and discards marginal ones.
FIFO Marker Management — Bounded, VPS-Ready
Every marker is created with a deterministic, collision-proof name (timeframe + bar timestamp + direction), so re-scans and re-initializations can never duplicate a signal. A First-In-First-Out buffer caps the on-chart object count at a user-defined maximum (default 50): when a new marker pushes the buffer past the limit, the oldest marker is removed automatically. Object count therefore stays bounded no matter how long the utility runs, keeping the terminal responsive for extended VPS deployment. All objects share one namespace prefix and are fully removed on shutdown, leaving no orphaned graphics behind.
Spread Watchdog — Live, Glanceable
The dashboard recomputes the live spread directly from Bid/Ask in points on each tick. When it exceeds your configured threshold (InpSpreadWarnPts), the value switches to the warning color — an immediate visual cue to stand aside during abnormal spread widening, such as news releases, the daily rollover, or thin liquidity.
On-Chart Dashboard
A compact, theme-able panel (top-left or top-right) displays the live color-coded spread, a per-timeframe table of the most recent pattern and its time, and a global "last detected" line. A one-click re-scan button re-evaluates the latest closed candle on demand, and every chart marker carries a tooltip with its timeframe, pattern, and timestamp.
Multi-Channel Alerts
Three independent, individually toggleable channels: the in-terminal Alert pop-up, mobile Push notifications (via your MetaQuotes ID), and a sound file. Each detection produces a precise message containing the symbol, timeframe, pattern type, price, and time.
Engineering
- Built entirely on modern MQL5 event handlers: OnInit, OnDeinit, OnTick, OnTimer, OnChartEvent.
- No DLLs, no WebRequest, no external libraries, no internet dependency.
- Leak-free object lifecycle with separate namespaces for dashboard and markers, so resizing the chart never erases your signal history.
- Fully commented and structured for extension — including a ready-to-use news / time-filter hook.
Input Parameters Guide
Timeframes to Monitor
- Monitor M1 / M5 / M15 — enable each period you want scanned, independently.
Price Action Patterns
- Detect Engulfing — toggle bullish/bearish engulfing detection.
- Detect Pinbar — toggle bullish/bearish pinbar detection.
Pinbar Settings
- Min tail/range ratio — dominant shadow as a fraction of total candle range (0.50–0.95, default 0.66).
Engulfing Settings
- Min current/previous body ratio — how much larger the current body must be vs the prior body (≥ 0.1, default 1.0).
Alerts
- Send Mobile Push Notification — requires a MetaQuotes ID in the terminal.
- Show MT5 Alert window — in-terminal pop-up.
- Play sound on detection — audible cue.
- Sound file — file name from the terminal's Sounds folder.
Chart Markers
- Draw markers — master on/off for on-chart arrows/dots.
- Marker style — Buy/Sell arrows or small dots.
- Marker size — 1 to 5.
- Gap from candle (points) — vertical distance between the candle high/low and the marker.
- Max markers kept (FIFO) — upper bound on retained objects; oldest removed beyond this (default 50).
- Only draw for the chart's own timeframe — reduces marker density when scanning M1+M5+M15 together.
Dashboard
- Position — Top-Left or Top-Right.
- X / Y offset — pixel offsets from the chosen corner.
- Font family — dashboard typeface.
- Spread warning level (points) — threshold above which the spread readout turns to the warning color.
Colors
- Eight fully customizable colors: background (slate), border, dividers, title text, header text, neutral, bullish (green), and bearish (red).
How to Use
- Attach the utility to a XAUUSD (Gold) chart. Any chart timeframe works — detection is independent of the chart period.
- Under Timeframes, enable the periods you want scanned (M1, M5, M15).
- Choose which patterns to detect, and tighten the Pinbar/Engulfing ratios if you want stricter signals.
- Select your alert channels. For mobile Push, set your MetaQuotes ID under Tools → Options → Notifications.
- Set Spread warning level to your acceptable spread ceiling for Gold, so the watchdog flags abnormal widening.
- Optionally enable Only draw for the chart's own timeframe to keep markers uncluttered, and adjust marker style,
