Home → Indicators → Gold M15 Signal Engine
PUBLISHED · OPEN SOURCE

Gold M15 Signal Engine
with H4 Trend Filter

This indicator identifies intraday setups on the 15-minute chart and attaches a complete, pre-calculated trade frame to each one: an entry, a stop-loss and three targets. It then tracks that setup bar by bar and records its observed status under the script's rules.

On the chart

XAUUSD · 15m · Gold M15 Signal Engine

Every signal appears with its entry, stop and three targets, and its outcome is marked on the chart — target reached or stop hit.

Open the interactive chart on TradingView →

Why it differs from a standard signal script

Most published signal scripts stop at the arrow. They mark an entry and leave the trader to guess the rest. Four design choices separate this one.

1. Every signal ships with its own risk frame

The stop-loss is derived from the structural level that produced the signal, not from a fixed pip distance, and is then capped by a percentage-of-price ceiling so a single wide candle cannot create an unreasonable stop. The first target is ATR-based. The second prefers a real support or resistance level detected on the chart, and only falls back to an ATR multiple when no suitable level exists — so target placement follows detected chart structure rather than a claim about what price will do.

2. The higher timeframe has a veto

A 4-hour EMA200 trend filter gates every signal. A long is only permitted when the 4-hour close is above its own EMA200, and a short only when it is below. This is intended to reduce one common failure mode of intraday signal scripts: firing counter-trend entries during a strong higher-timeframe move.

3. Signals report their own outcome

Once a signal is active the script follows it. It marks the bar where each target was reached, moves the displayed stop to breakeven after the first target and to the first target after the second, and hides the setup once the stop is hit. Setups that neither complete nor fail within a configurable number of bars are marked expired rather than left on the chart indefinitely.

4. It stands aside around US data

From v3.1 no new signal is taken from 60 minutes before to 60 minutes after ten scheduled US releases: FOMC decisions and minutes, CPI, NFP, PCE, PPI, retail sales, both ISM reports and weekly jobless claims. The dates are stored in the script from the official calendars, the same ones used by the News Reaction Map. A skipped signal is marked with a small grey "news" tag and counted in the tally. On our research build, entries taken inside those windows averaged a loss while all other entries averaged a gain.

How the signal engine works

Three independent detection paths can produce a signal. All must additionally pass the RSI gate, the higher-timeframe filter and a cooldown period.

  1. EMA pullback. In an aligned trend, price wicks into the EMA20 and closes back on the trend side of it. The candle must close in the outer 55% of its own range, which filters out indecisive bars.
  2. Support and resistance reaction. Price tests a detected level within a 0.15% tolerance and closes back on the correct side, with the same candle-strength requirement.
  3. N-bar breakout. Price closes beyond the highest high or lowest low of the previous N bars with a directional close.

Support and resistance levels are built from confirmed pivot highs and lows. A minimum-gap rule prevents clustered levels from stacking, and the number of active levels on each side is capped.

Reading the panel

The panel shows the direction of the active signal, its entry, the current stop, all three targets, the bar it was created on, its live status, and the current 4-hour trend state. The status line progresses through: active, first target reached with the stop moved to entry, second target reached with the stop moved to the first target, complete.

Limitations — please read

  • It runs on the 15-minute timeframe only. On any other timeframe it draws a warning and produces nothing. The thresholds were tuned for 15-minute gold behaviour and do not transfer.
  • It was tuned on gold. Tolerances, ATR multipliers and RSI bounds reflect how XAU/USD moves. On other instruments the defaults will need adjustment.
  • Signals are evaluated on confirmed bars only, so the script does not repaint — but a signal appears at the close of its bar, not during it.
  • Target and stop levels are calculated when the signal fires and are not recalculated. If volatility changes after entry, the levels do not adapt.
  • When both the stop and a target fall inside one bar's range, the stop is resolved first. Real intrabar sequence may have differed.
  • It knows release times, not figures. The news filter covers ten scheduled US releases only. Unscheduled news, speeches and geopolitical events are not filtered, and the stored calendar needs updating when agencies publish new dates.
  • This is an analysis tool, not a trading system. It does not account for spread, commission, slippage or position sizing.

Originality

The three detection paths use well-known building blocks — EMAs, RSI, ATR, pivot-based levels. The original work is in how they are combined: a structural stop bounded by a percentage ceiling, a second target that prefers real chart levels over a fixed multiple, a higher-timeframe veto applied uniformly across all three paths, and a per-signal outcome tracker with automatic stop progression and expiry.

No performance claim. This publication makes no claim about win rate or profitability, because no such claim can be substantiated for future market conditions. We did measure it on a limited sample and published the figures with their limits on the method page, along with the full measurement code.