# EMA+PSAR+MACD

A trading bot using MACD, PSAR, and EMA indicators for entering long and short positions.

Canonical: https://prismaticalgos.com/compendium/algo/3339-ema-psar-macd
Record ID: 3339
Catalog rank: 2839 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.prorealcode.com/topic/pls-code-emapsarmacd/
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: EURUSD, GBPUSD, USDJPY
- timeframes: M15, H1, H4, D1
- sessions: 24/7
- market_regime: trending|volatile

## Indicators

- MACD: {"fast_period": 12, "signal_period": 9, "slow_period": 26}; applied to: close
- PSAR: {"acceleration": 0.02, "maximum": 0.02, "step": 0.2}; applied to: close
- EMA: {"period": 9}; applied to: close
- EMA: {"period": 26}; applied to: close

## Recorded long-entry rules

- MyMACD crosses over MySignalLine
- LongSAR is true
- EMA9 crosses over EMA26
- Not on market

## Recorded short-entry rules

- MyMACD crosses under MySignalLine
- ShortSAR is true
- EMA9 crosses under EMA26
- Not on market

## Recorded exit rules

- Trailing stop on long position
- Trailing stop on short position

## Recorded filters

- Not specified.

## Risk controls

- Stop loss: Trailing stop based on EMA26
- Take profit: Double the stop loss
- Position sizing: 1 contract
