Trend line and level alerts in MetaTrader 5
MetaTrader 5's own alert watches a fixed price. A trend line is not a fixed price: it moves with every candle, and by the time it matters it is no longer the number you typed in. fx-alert watches the line itself — the one you drew, on the timeframe you drew it on — and tells you when price touches it, or when a candle closes beyond it.
What a line alert is watching
The line, not a snapshot of it. When you set the alert, fx-alert records the line's two anchor points, removes your drawing, and draws its own locked line from the record. From then on the alert belongs to the terminal rather than to the chart: change timeframes, close that chart window, restart MetaTrader — the alert comes back and keeps watching. It only asks that the terminal itself stays open.
The timeframe the line was drawn on travels with it. MetaTrader converts a time into a bar index before reading a sloped line, so the same two anchors give slightly different values on different timeframes. The line fx-alert watches is the one you were looking at when you drew it.
Touch, or candle close
- Touch — Ask or Bid reaching the line, tick by tick. The earliest you can be told. You choose which side — the spread means Ask and Bid reach a level at different moments, and for a level you plan to sell into, Bid is usually the honest one.
- On close — a candle finishing beyond the line, on a timeframe you pick, measured on the open, high, low or close. A wick through your level is not the same as a close beyond it.
A close alert can hold a pair in one slot: Close below the line AND Low still above it — a candle that closed through without spiking through. Both sides must point the same way; fx-alert will not let you write a pair no candle could satisfy.
How to set it in fx-alert
- Draw a trend line or a horizontal line on any chart, and select it.
- Press + Alert on that chart.
- Choose Touch or Candle, the operand, and the operator.
- Pick your channels and press Set alert.
The alert works on any chart, not only the one the EA sits on. Full walkthrough with screenshots: How to Use.
Common mistakes
Setting it on the side price is already on. If price is already below your line when you ask for "Close below the line", fx-alert holds the alert until price returns above it, then arms. The panel row says so, and counts how many recent closes are already on the far side.
Expecting a hidden line to work. If the line is hidden on that chart — set to no colour, or limited to other timeframes — fx-alert will not take it, and says so. Watching a level you cannot see is how an alert becomes a surprise.
Drawing a line too short to read. A sloped line that lives inside a single candle has no slope to measure, and fx-alert says it cannot read that line here rather than guessing at one.
Forgetting a line keeps going. Your alert's line extends to the right, so a steep one eventually reaches a price that means nothing. Alerts do not expire on their own; the panel is where you clear out the ones your plan has moved past.
Pair it with
Your line is a price, so it can be paired inside one alert with anything else on the price scale, and needs a second alert for anything that is not — RSI and MACD have scales of their own. The patterns are on the combinations page.
fx-alert is an alert tool, not investment advice. It reports that a condition you set became true; what to do about it is always your decision. Trading forex and CFDs carries a high risk of losing money.