Half Trend ADX
- Indicators
-
Allan Aparece Ninal
I build indicators and Expert Advisors for MetaTrader 5.
How I work:
- Every indicator is checked for repainting: signals are decided on closed bars only, and an every-tick test confirms they do not change afterwards. - Version: 1.0
- Activations: 5
Half Trend ADX is a trend indicator for MetaTrader 5. It draws a trend line, buy and sell arrows and alerts, and can skip weak trends with an ADX filter.
It is an indicator, not a trading system: it places no orders and manages no trades.
What you see on the chart
- Half Trend line: blue while the trend is up, red while it is down.
- Buy and sell arrows: one arrow on the bar where the trend turned.
- ATR channel: two optional dotted lines around the trend line.
- ADX value: shown in the Data Window and available as a buffer.
How the signal is built
- The line is built from the highest low and lowest high of the last Amplitude bars. In an up trend it can only rise, in a down trend only fall, until the trend turns.
- A turn is judged on a closed bar. The forming bar never carries an arrow.
- With the ADX filter on (the default), the arrow and its alert appear only if ADX(14) on that bar is at least the minimum (default 25).
- Once a bar has closed, its arrow does not change or disappear.
Who it is for
For traders who read trend turns on the chart, or build their own rules or Expert Advisor on an indicator. Not for anyone looking for an automatic trading robot.
Inputs
- Amplitude – 2 – bars in the high/low window. Larger values give fewer, slower flips.
- Channel deviation – 2.0 – channel width as a multiple of ATR(100) / 2.
- Only show signals when ADX is strong – on – turns the ADX filter on or off.
- ADX period – 14 – period of the ADX calculation.
- Minimum ADX for a signal – 25 – flips below this ADX are skipped.
- Draw the Half Trend line, Draw the ATR channel – on – show or hide each.
- Arrow distance from the candle – 12 – gap in pixels.
- Pop-up alert – on; Play a sound – off; Sound file – alert.wav; Push notification – off; E-mail – off.
Alerts and Expert Advisor use
One alert per signal, sent when the bar closes, never twice for the same bar and not while the history loads.
Buffers: 0 Half Trend line, 1 line colour (0 up, 1 down), 2 buy arrow (the bar's low), 3 sell arrow (the bar's high), 4 channel upper, 5 channel lower, 6 ADX. Empty values are EMPTY_VALUE. Read buffers 2 and 3 from bar 1, the last closed bar, backwards.
Starting settings
The starting settings screenshot shows four presets, one per timeframe: M15 (Amplitude 3, Minimum ADX 30), H1 (2, 25), H4 (2, 20) and D1 (1, 20). They differ in how many arrows they give, not in how well they trade; none is optimised. Arrows per month, counted from October 2023 to October 2026 on EURUSD, GBPUSD, USDJPY and XAUUSD:
| Timeframe | Arrows per month |
| M15 | 13 to 15 |
| H1 | about 10 |
| H4 | about 4 |
| D1 | about 1 |
Raise Amplitude or Minimum ADX for fewer arrows, lower them for more.
How it was checked
- Code check: an every-tick run on EURUSD H1, January to October 2026, 4,644 bars and 102 signals; no signal changed after its bar closed and none appeared on the live bar.
- Code check: line, channel, ADX and every arrow matched an independent reference calculation on EURUSD, GBPJPY, XAUUSD and BTCUSD on M15, H1 and H4.
- These checks show the indicator behaves as described. They do not show that the arrows are profitable.
FAQ
- Does it repaint? Arrows and alerts are decided at bar close and do not change afterwards. The line and channel can move on the forming bar.
- Can I try it first? The Market demo runs in the Strategy Tester, in visual mode, only.
- Does it work on gold and crypto? It runs on any symbol and timeframe; XAUUSD and BTCUSD were part of the checks above.
- Can I get alerts on my phone? Yes, switch on Push notification and set your MetaQuotes ID in the terminal.
- Do I need the ADX filter? No. Switch it off for an arrow on every turn.
Questions: use the comments on this page or send me a message on MQL5.
Trading carries risk of loss, and past behaviour of an indicator says nothing about the future.
