# APB Channel EA

A reversal EA using Heikin-Ashi bars and Keltner-style channels with swing-structure stops.

Canonical: https://prismaticalgos.com/compendium/algo/2639-apb-channel-ea
Record ID: 2639
Catalog rank: 4 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.mql5.com/en/code/77393
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: XAUUSD
- timeframes: M15
- sessions: TradeStartHour 7:00, TradeEndHour 21:00 GMT, Avoids Friday close after 20:00 GMT
- market_regime: any

## Indicators

- Heikin-Ashi: {"period": 60}; applied to: close
- EMA: {"period": 20}; applied to: close
- ATR: {"period": 20}; applied to: close

## Recorded long-entry rules

- Heikin-Ashi bar colour changes from bearish to bullish
- Price closes at or above the lower band of the Keltner channel

## Recorded short-entry rules

- Heikin-Ashi bar colour changes from bullish to bearish
- Price closes at or below the upper band of the Keltner channel

## Recorded exit rules

- 1.5R take profit
- Stop loss at the lowest low of the last SwingLookbackBars closed bars plus a buffer
- Break-even move to entry plus a small lock once price covers BreakEvenTriggerPct of the distance to target
- Close on an opposite-direction arrow

## Recorded filters

- Time window — only trade between TradeStartHour and TradeEndHour (server time)
- Liquidity — the signal bar's tick volume must be at least MinVolumeRatio × the recent average
- Large-candle / volatility — if ATR exceeds MaxATRPips, entries are skipped

## Risk controls

- Stop loss: Beyond the lowest low (for buys) or highest high (for sells) of the last SwingLookbackBars closed bars, plus a configurable buffer
- Take profit: RR_Ratio × the risk distance (1.5 by default)
- Position sizing: Lot size is calculated from the distance between entry and stop, so the monetary risk stays constant regardless of how wide the structural stop happens to be
