# Golden Cross and Dead Cross

Enters long on Golden Cross and short on Dead Cross using moving averages.

Canonical: https://prismaticalgos.com/compendium/algo/2840-golden-cross-and-dead-cross
Record ID: 2840
Catalog rank: 1286 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.mql5.com/en/code/46426
Evidence label (unverified): source_code

## Scope and limitations

These are machine-extracted research records, not verified trading systems. Catalog rank measures specification detail and claimed evidence, not profitability. The catalog extraction pipeline did not independently backtest these records. Its separate selected testing ledger does not validate the wider corpus. Rules, labels and parameters can be incomplete or wrong; consult the original source and its reuse terms.

No endorsement, ownership claim or source-code reuse permission is implied.

## Extraction warnings

Build warnings: MT4_ONLY: the captured source is MQL4 / written for MetaTrader 4. It needs porting (order functions, indicator handles) before it runs on MT5.

## Recorded profile

- symbols: Not specified
- timeframes: Not specified
- sessions: Not specified
- market_regime: trending|null

## Indicators

- EMA: {"period": 50}; applied to: close

## Recorded long-entry rules

- The value of the previous moving average is higher than the shorter-term moving average.
- The value of the moving average two periods ago is lower than the shorter-term moving average.
- The value of the moving average two periods ago is lower than the value of the previous short-term moving average.

## Recorded short-entry rules

- The value of the previous moving average is lower than the shorter-term moving average.
- The value of the moving average two periods ago is higher than the shorter-term moving average.
- The value of the moving average two periods ago is higher than the value of the previous short-term moving average.

## Recorded exit rules

- Entry orders are managed only with stop loss orders and take profit limit orders.

## Recorded filters

- Not specified.

## Risk controls

- Stop loss: Stoploss value from the mid-term MA
- Take profit: same distance as stop orders but on the positive side
- Position sizing: null
