TradingSignalBot Get early access

Strategy template · early access

MACD crossover strategy, automated

The MACD line crosses its signal line below zero in an uptrend, or above zero in a downtrend, with price on the 200 EMA's side. The bot runs it on real candles, draws each signal and posts it to your Telegram channel, built with you in early access.

The most recent macd crossover signal on XAUUSD, drawn by the bot: sell at 4113.28
The most recent signal this template's code found on Gold (XAUUSD): a sell at 15:00 New York on Wednesday 21 October 2026, on real 15 min candles. Drawn by the bot.

What the macd crossover is

MACD, moving average convergence divergence, was designed by Gerald Appel in the late 1970s. It subtracts a 26-period exponential moving average of the close from a 12-period one to make the MACD line, then smooths that line over 9 periods to make the signal line. When the MACD line crosses above the signal line, momentum has turned up; a cross below means it has turned down.

A cross near the zero line is the weakest, and a cross far from it, after a stretched move, is the one most traders wait for. The version here takes a buy only when both lines are below zero and price is above the 200 EMA, a pullback inside an uptrend, and a sell on the mirror image. Every part is a number compared with a number.

The bot's rules

  1. MACD is 12/26/9, worked out on the close of 15-minute candles.
  2. Buy when the MACD line crosses above its signal line while both are below zero and the close is above the 200 EMA.
  3. Sell when it crosses below while both are above zero and the close is under the 200 EMA.
  4. Stop beyond the lowest low (sell: highest high) of the last 10 candles, at least 0.5 × ATR(14) from the entry. Targets at 1, 1.5, 2 times the stop distance.

Which version. MACD 12/26/9 with the 200 EMA as the trend filter, as it is usually taught for 15-minute gold: the cross must happen away from zero, the stop beyond the last ten candles, targets at 1, 1.5 and 2 times the stop.

The settings

The defaults the example was found with. Each one is a setting, not a rewrite.

SettingDefaultWhat you can change
MarketXAUUSDGold or any of the seven US-dollar majors; other markets need a price feed first.
Candles15 minutesMACD is computed on these.
Fast EMAEMA 1212 is the default.
Slow EMAEMA 2626 is the default.
Signal line9 candles9 is the default.
Trend filterEMA 200Buys only above it, sells only below it. 0 turns it off.
Away from zeroonA buy needs both lines under zero, a sell both over it.
Stop beyond the last10 candlesThe lowest low for a buy, the highest high for a sell.
Smallest stop0.5 × ATR(14)Used when the last candles' extreme is closer than this.
Targets1, 1.5, 2 × the stopOr a fixed pip distance.

The example, as the bot would post it

The signal in the chart above: found by the template's code on XAUUSD 15 min candles at . Its levels, and the message the bot would send with the chart:

  • Entry4113.28
  • Stop4141.29 · 28 pips
  • TP14085.27 · +28 pips
  • TP24071.26 · +42 pips
  • TP34057.26 · +56 pips
🔴 SELL XAUUSD · MACD crossover

Entry: 4113.28 (market)
Stop: 4141.29 (28 pips)
TP1: 4085.27 (+28 pips)
TP2: 4071.26 (+42 pips)
TP3: 4057.26 (+56 pips)

MACD line crossed below its signal line, above zero, with price under the 200 EMA. Stop beyond the last 10 candles; targets at 1, 1.5, 2 times the stop.

Not financial advice. Trade at your own risk.

The same signal in another of the bot's chart templates, Daylight, with a space for your logo:

The same macd crossover signal in the Daylight chart template

How often it fires

Signals the template's code found with the defaults over the last twelve months of candles. A count of signals, not of wins: we publish no results for templates.

Gold (XAUUSD)
29.8signals a month: 358 from 2025-10-23 to 2026-10-23
EURUSD
34.3signals a month: 412 from 2025-10-23 to 2026-10-23

Automation, not an edge. A template does the work of watching the chart, finding the setup and posting it. It does not make the strategy win. Before it goes live in your channel we run it over past candles on your markets and show you every signal it would have sent, losses included, privately.

What can be changed

  • The rules: every setting above, and any filter or confirmation you can write down.
  • The markets: gold and the seven US-dollar majors, one or all of them.
  • The chart: your logo where the placeholder is, a chart template in your colours, and the marks your method uses.
  • The channels: every signal to a paid channel and a paced share to a free one, the way our own channels run.

Or bring a strategy that is not here: every template started as rules someone wrote down.

Questions

Why must both lines be below zero for a buy?

A cross below zero marks momentum turning up after a pullback. A cross above zero comes later in a move and is often taught as a weaker entry. It is a setting: turn it off to take every cross.

Is MACD 12/26/9 the right setting?

It is the default on every platform and the one the textbooks use, and we do not claim it suits any market. Faster settings cross more often. A test on past candles shows how a setting behaved on your market, losses included.

Why is the first target 1.5 times the stop?

1.5 is the multiple the popular version of this strategy uses; the bot also sends targets at 1 and 2 times the stop, and you can set your own.

Does the bot place trades?

No. It finds the setup, draws the chart, posts the signal to your Telegram channel and follows it with a reply at each target and at the stop. It does not connect to a broker or trade any account.

Can I change the rules?

Yes. Every setting in the table above is yours to change, and so is anything else that can be written down: a filter, a session, a second confirmation, a different stop. If a step is a judgement call, we work out with you how to write it as a rule.

Will it make money?

We do not say it will, for this template or any other. A template is automation, not an edge. Before it goes live we run it over past candles on your markets and show you every signal it would have sent, losses included, privately. How a strategy behaved on past candles is not what it will do.

Is it AI?

No. It follows the written rules on this page. The same candles always give the same signals.

Which markets and timeframes?

The seven US-dollar majors and gold today, on any timeframe from 5 minutes to daily. Other markets need a price feed for them first; ask us.

What does it cost?

Templates are in early access: built with you, for your channel, and priced before launch. Early-access members hear the price first. For a broker, prop firm or educator, write to us.

Other strategy templates

A opening range breakout signal on XAUUSD, drawn by the bot

XAUUSD · 5 min · 21 a month

Opening range breakout

The first 15 minutes after the New York open set a range; the first 5-minute close outside it is the signal.

A fair value gap signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 32 a month

Fair value gap

Three candles leave a gap that price skipped; the first candle to come back into it is the signal.

A liquidity sweep signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 7 a month

Liquidity sweep

Price runs through the previous day's high or low, then a 15-minute candle closes back inside the level: that close is the signal.

A order block signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 26 a month

Order block

A strong candle breaks the last swing high; the last down candle before it is the block, and the first return into it is the signal.

A ema crossover signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 47 a month

EMA crossover

The 9 EMA closes across the 21 EMA in the direction of the 200 EMA: a buy above it, a sell below it.

A supertrend signal on XAUUSD, drawn by the bot

XAUUSD · 1 hour · 11 a month

Supertrend

The Supertrend line (ATR 10 × 3) flips from above price to below it, or the other way: the candle that closes through it is the signal.

A london breakout signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 7 a month

London breakout

The Asian session sets a range; the first 15-minute close above its high or below its low after the London open is the signal.

A break and retest signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 25 a month

Break and retest

Price closes beyond a swing high or low, comes back to the level within twelve candles and closes on the broken side: that close is the signal.

A rsi divergence signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 13 a month

RSI divergence

Price makes a lower swing low while the RSI makes a higher one, the first in oversold territory: a buy once the second swing is confirmed. The mirror is a sell.

A silver bullet signal on XAUUSD, drawn by the bot

XAUUSD · 5 min · 12 a month

Silver bullet

A fair value gap forms in the 10:00 to 11:00 New York window; the first candle back into it before 11:00 is the signal.

A judas swing signal on XAUUSD, drawn by the bot

XAUUSD · 15 min · 16 a month

Judas swing

A candle runs through the Asian range early in London, then a 15-minute candle closes back inside it: that close is the signal.