Most tools make you reopen the panel to change anything. The hma nrp alerts arrows ahtf with buttons indicator does not: it draws a Hull average coloured by slope, marks the turns, and places clickable buttons on the chart itself so you can toggle behaviour without leaving the window.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: HMA Up, HMA Down, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 17 |
Plots, colours and placement
Two line plots, two marks and chart buttons.
`HMA Up` traces deep sky blue at width 2.
`HMA Down` traces tomato at the same width.
`Buy` prints lime using arrow 233.
`Sell` prints red using arrow 234.
Buttons sit at `BtnX` `10` and `BtnY` `30`.
- HMA Up: line, deep sky blue, width 2
- HMA Down: line, tomato, width 2
- Buy: arrow, lime, width 2, arrow code 233
- Sell: arrow, red, width 2, arrow code 234

What the code actually computes
The Hull construction
Two weighted averages of different lengths get combined, and a third pass over the result uses the square root of `HmaPeriod` `20` as its own length. That is what makes it turn quickly.
Colour by slope
One buffer holds the curve while it rises and the other while it falls. Only one carries a value on any bar, which is what produces the two-tone line.
The anchor setting
`HigherTF` `PERIOD_H4` names the slower chart the tool anchors against. `PriceMode` `PRICE_CLOSE` decides which price feeds the whole calculation.
On a live chart
Deep sky blue means the curve is rising.
Tomato means it is falling.
A mark lands where the colour changes.
`ArrowOffsetPts` `8.0` keeps marks tight to the bar.
Buttons sit at `BtnW` `100` by `BtnH` `22` pixels.
Warm-up needs about twenty-eight bars.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
A turn of the curve is what speaks, and this build is unusually loud about it: `EnableSound` arrives on alongside `EnablePopup` under `EnableAlerts`. Mail and the phone route stay closed until you open them.
Every HMA NRP Alerts Arrows Ahtf With Buttons Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
HmaPeriod |
HMA length. Length of the Hull calculation, `20`. | 20 |
PriceMode |
price source. Price the calculation reads, `PRICE_CLOSE`. | PRICE_CLOSE |
HigherTF |
AHTF anchor. Slower chart it anchors against, `PERIOD_H4`. | PERIOD_H4 |
BtnX |
Button block distance from the left edge, `10`. | 10 |
BtnY |
Its distance from the top, `30`. | 30 |
BtnW |
(see inputs panel) | 100 |
BtnH |
(see inputs panel) | 22 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPts |
Arrow distance (points). Points between a mark and its bar, `8.0`. | 8.0 |
BtnOnColor |
Tint of an active button, `clrSeaGreen`. | sea green |
BtnOffColor |
(see inputs panel) | dim gray |
BtnTextColor |
(see inputs panel) | white |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch over the turn message, `true`. | on |
EnablePopup |
It comes up in the terminal window, `true`. | on |
EnableSound |
It also plays on the desktop, `true`. | on |
EnableEmail |
(see inputs panel) | off |
EnablePushNotify |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Which chart earns the most from it
A twenty-bar Hull turns faster than a twenty-bar average of any other kind. EURUSD H1 is the reference chart, where the colour changes most days. On M5 the turns come constantly. On H4 each colour run spans a week.
Honest weaknesses
Faster turning means more turns, not better ones.
A slope flip can reverse on the next bar.
Buttons are chart objects and take up screen space.
The curve still lags the price behind it.
Copy the compiled HMA NRP Alerts Arrows Ahtf With Buttons Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Background reading on the method behind the HMA NRP Alerts Arrows Ahtf With Buttons Indicator: Moving average on Wikipedia, Weighted Average at Investopedia.
Download the HMA NRP Alerts Arrows Ahtf With Buttons Indicator for MT4 and MT5
The zip holds the compiled HMA NRP Alerts Arrows Ahtf With Buttons Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What makes HmaPeriod 20 turn faster than an ordinary average?
The Hull construction subtracts a slower weighted average from twice a faster one, then smooths the result over the square root of the period. That combination removes most of the lag a plain twenty-bar average carries.
What do the on-chart buttons do?
They toggle the tool’s behaviour without reopening the inputs panel. `BtnOnColor` `clrSeaGreen` shows an active state and the off colour shows an inactive one, so the current setting is visible at a glance.
What turns the HMA Up line tomato?
The curve falling against the previous bar. Both buffers carry the same value and the code writes it into whichever matches the current slope, so that swap is what you see as a colour change.
Why is ArrowOffsetPts 8.0 so small?
Because the marks relate to a curve sitting on the candles rather than to a distant signal. Eight points keeps each one close to the bar it belongs to, which matters when the line turns often.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the HMA NRP Alerts Arrows Ahtf With Buttons Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Also, browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in Basis trading on Wikipedia.
- Additional market context is at iforce (FORCE) at the MQL5 Documentation.
