SSALGODocs
Website ↗Open app
Strategy library

MACD

Use MACD and signal-line crossovers with an optional zero-line confirmation.

How the indicator works#

MACD is the fast EMA minus the slow EMA. The signal line is an EMA of the MACD series, and the histogram is MACD minus the signal line.

The MACD calculation uses simple-average seeds for its EMAs. Matching another chart requires the same history and initialization as well as the same periods.

Settings#

Field Observed form fallback Meaning
Fast Period 12 Fast EMA period
Slow Period 26 Slow EMA period
Signal Period 9 EMA period applied to the MACD series
Zero-Line Confirmation Review selection Whether zero-line agreement is required

Fast Period must be below Slow Period. The signal period must be positive.

Warm-up#

The first complete MACD and signal-line pair needs slow period plus signal period minus one candles. At 12, 26, and 9, that is 34 candles. The first valid value is not necessarily the first eligible crossover event.

Confirmation and execution#

A crossover with zero-line confirmation required can be filtered even when the lines cross. Inspect the selected confirmation option before changing other settings.

Targets, stops, contract selection, and trading windows are configured separately in the shared builder.

If a crossover does not trade#

Check warm-up history, the confirmation option, execution mode, start behavior, and the monitor's reason. Compare equivalent candle timestamps when using an external chart.

Continue with risk controls, start and stop, or feature availability.

Search the handbook