AP ATR Trail (Indicator)
ATR-based trailing stop and bias line for MT5. Plots a single active trail (up or down) and can alert on flips and retouches.
Lightweight and neutral for discretionary trade management and screenshots.
Overview
Indicator for an ATR-based trailing stop and bias line.
Plots a single active trail (uptrend or downtrend) to keep charts clean.
Optional alerts when the trail flips or when price retouches the active trail.
No external resources or DLLs.
How it works
Calculates an ATR-based trail on the selected timeframe.
Uptrend: trail is plotted below price. Downtrend: trail is plotted above price.
When closing price moves through the trail, the state flips and the opposite trail becomes active.
Optional retouch alert notifies when price touches the active trail without a confirmed flip.
What is drawn
Two internal buffers: UpTrail (active in uptrend) and DnTrail (active in downtrend).
Only the active side is shown; the inactive side stays hidden for clarity.
Alerts
Flip — state changes after a bar close (trail switches side).
Retouch — intra-bar touch of the active trail (no state change).
Delivery options: popup, sound and push notifications.
Main inputs
Trail & distance
ATR_Period — ATR lookback (default 14).
ATR_Multiplier — distance from reference (default 3.0).
Use_HL_Extremes — use recent highs/lows (Chandelier-style) as the reference; off = pure ATR offset.
Notifications
Show_Retouch_Alerts — enable/disable retouch alerts.
Alerts — choose Popup / Sound / Push.
SoundFile — custom sound file (optional).
Style
Line colors and width for Up/Down trails.
Choose colors that match your template (dark/light).
Suggested starting points
Swing: H1–H4, ATR 14, Multiplier 3.0–4.0.
Intraday: M5–M15, ATR 10–14, Multiplier 2.2–2.5.
Higher volatility symbols: consider a larger period or multiplier.
How to use
Add the indicator to a chart and set ATR_Period and ATR_Multiplier .
Enable Flip and/or Retouch alerts as needed.
Use the trail as a dynamic stop or as a directional filter alongside your entry method.
(Optional) Read the trail value from the buffer in your own EA/manager.
Notes & support
Indicator only (no auto-trading).
Flip is confirmed on bar close; retouch checks intra-bar ticks.
No DLLs and no external links. Tested on FX, indices, metals and crypto.
Requires current MT5 build or newer.
Support: use the contact options on AP Trading Tools support if you need help or presets.
Changelog
v1.0 — Initial release (ATR trail with Flip/Retouch alerts; optional highs/lows reference; popup/sound/push options).
© AP Trading Tools • Built for MetaTrader 5