← Strategy library

Moving-Average Trailout when the trade stops behaving like a trend

Evidence: ModerateBeginnerExit · Structural trail

Hold while the daily close stays above a moving average; leave on the first close below it. No distance, no multiple — the exit is a statement about the trend's character rather than about how far price has moved.

Compared with a volatility trail it gives back more on sharp reversals and less on slow ones, and it has one practical advantage that matters: the exit level is visible on the chart to anyone looking, including you at 3am, which makes it much harder to override.

This page is an exit method, not a trade. Attach it to any entry in the library and test the pair together — an exit tested against one entry tells you almost nothing about how it behaves with another.

Applies to
Trend entries, especially on D1
Timeframe
D1 primarily · H4 for faster systems
Best suited to
Slow, persistent trends — currencies and indices more than gold
Worst suited to
Anything that moves in violent steps; the average is too slow to protect open profit
Tools
One moving average — EMA(20) is the usual choice — and the closing price

Valid setup

EX-03 · MOVING-AVERAGE TRAIL — THE SAME TRADE, EXIT THREE EURUSD · H1 · held while the close stays above the EMA(20), out on the first close below it LONG 1.0791 1.0827 1.0864 1.0901 1.0938 1.0974 1.1011 held while the closes stayed above EMA(20) — the exit line, visible the whole way ENTRY EXIT = first CLOSE below the EMA(20) 1 2 3 4 1.0842 1.0946 ① A hard stop covers the early part of the trade ② Price dips toward the average and closes above — held ③ Same again — wicks do not count, closes do ④ First close BELOW the average ends it ⑤ Later than a volatility trail on a sharp turn ⑥ And far harder to talk yourself out of

Exact rules

When it applies

  • Use it when you want the exit tied to the trend's structure rather than to volatility.
  • Pick the length from the holding period you want, not from what looks best on a chart: shorter average, shorter trade.
  • Only closes count. An intrabar spike through the average is not an exit, and treating it as one turns this into a much worse strategy.
  • One average. Adding a second one to confirm the first is the multi-timeframe mistake in a different costume.

If it goes wrong

  • Keep a separate hard stop for the first part of the trade — the average is usually far away at entry and offers no protection early.
  • Once price has moved a full R in your favour, the average takes over and the hard stop is retired.
  • That handover point is a parameter too, and it should be tested rather than assumed.

The exit rule

  • No target. Out on the first close through the average.
  • Expect to give back more than a volatility trail on fast reversals — the average needs several bars to notice a turn.
  • Do not switch to the average early because the trade is 'looking weak'. The whole benefit is that this rule is visible and mechanical.

Build Moving-Average Trail

Reading this page is free and always will be. Taking it is what costs — the complete MQL5 for the rules above, yours to keep, permanently. Five of them cost $10 and they never expire.

More from Exits & trade management

Trading carries risk and most retail accounts lose money. Nothing on this page is financial advice or a recommendation to trade. The chart is an illustration of the rules on constructed candles — it is not a record of a trade and not a backtest.