Custom Aroon Indicator: Bars Since the High and Low

Written by Dominic Walsh · Published · Last updated

The custom aroon indicator answers one question. How long has it been since the highest high and the lowest low? `LookbackPeriod` `14` sets the window, and both counts turn into a reading from 0 to 100.

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 Separate window (levels 30 / 50 / 70)
Plots 4: Aroon Up, Aroon Down, Aroon BUY, Aroon SELL
Alerts popup, push notification, email, sound
Inputs 7

What the Custom Aroon Indicator draws on the chart

Aroon Up runs in dodger blue and Aroon Down in tomato.

The pane is fixed between 0 and 100.

Reference levels sit at 30, 50 and 70.

`Aroon BUY` and `Aroon SELL` draw at fixed heights of 10 and 90, away from the lines.

  • Aroon Up: line, dodger blue, width 2
  • Aroon Down: line, tomato, width 2
  • Aroon BUY: arrow, lime, width 3, arrow code 233
  • Aroon SELL: arrow, red, width 3, arrow code 234
Custom aroon indicator up and down lines with crossing arrows on EURUSD H1.
Custom aroon indicator up and down lines with crossing arrows on EURUSD H1.

How the Custom Aroon Indicator calculates its values

Counting, not averaging

The code finds the highest high inside `LookbackPeriod` `14` bars and notes how many bars ago it happened. Aroon Up turns that distance into a percentage of the window. Aroon Down does the same for the lowest low.

A fresh extreme reads 100

A high on the current bar puts Aroon Up at a hundred. A high fourteen bars back puts it at zero. So the reading measures recency, and says nothing about size.

The crossings drive the marks

Aroon Up passing above Aroon Down fills the buy plot. The opposite crossing fills the sell plot. Both marks sit at fixed pane heights, so a run of them lines up neatly.

How to read the signals

A high reading means the extreme happened recently.

Both lines near 50 means neither extreme is fresh.

Marks at 10 and 90 sit clear of the lines on purpose.

This is a timing measure, so it says nothing about how far price moved.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` is the master switch and ships true. `EnablePopup` shows the terminal dialog. The phone route `EnablePushNotify`, the mail route `EnableEmail` and the clip route `EnableSound` all begin false. `SoundFile` picks the clip. One message per closed bar.

Every Custom Aroon Indicator input

Core settings

Setting What it does Default
LookbackPeriod Aroon lookback period. Bars in the window that both counts use, default `14`. 14

Alert settings

Setting What it does Default
EnableAlerts Master switch for the crossing alerts, default `true`. on
EnablePopup Terminal dialog on a crossing, default `true`. on
EnablePushNotify Phone push on a crossing, default `false`. off
EnableEmail Mail delivery on a crossing, default `false`. off
EnableSound Sound playback on a crossing, default `false`. off
SoundFile Clip played by the sound route, default `”alert.wav”`. alert.wav
Custom aroon indicator inputs panel showing LookbackPeriod and the alert switches.
Custom aroon indicator inputs panel showing LookbackPeriod and the alert switches.

Settings that fit your chart

A recency count works on any chart with clean swings. EURUSD H1 is the reference chart, where `LookbackPeriod` `14` covers over half a day. On M15 the lines reset constantly. Daily bars stretch the same window across two weeks.

When the Custom Aroon Indicator fails

One new extreme resets a line to a hundred, however small the move behind it was.

Crossings cluster when highs and lows alternate inside the window.

A single core input leaves little to tune besides window length.

Copy the compiled Custom Aroon 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.

Download the Custom Aroon Indicator for MT4 and MT5

The zip holds the compiled Custom Aroon 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does LookbackPeriod 14 count?

Bars since the highest high and bars since the lowest low, both inside a fourteen-bar window. The two counts become percentages, which is why the pane runs from 0 to 100. Widening the window makes each line move more slowly.

Why do Aroon BUY marks sit at a fixed height?

So they never overlap the two lines. The buffers write 10 and 90 rather than the reading itself, which keeps a run of marks on one level. That trades away detail for a pane you can scan quickly.

Does Aroon Up at 100 mean a big move?

No. It means the highest high in the window landed on the current bar. That high could be a single point above the previous one. Recency is all this measure reports, so pair it with something that reads distance.

What does EnableSound need to work?

A clip name in `SoundFile`, which defaults to `”alert.wav”`, and the switch itself set true. The file has to sit in the terminal sound folder. `EnableAlerts` also has to stay on, since it gates every route.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Custom Aroon Indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Also, truly, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment