EMA Angle Indicator: Trend Slope in Actual Degrees

Written by Dominic Walsh · Published · Last updated

Everyone judges whether a moving average is rising steeply or flattening out. The ema angle indicator puts a number on it. It measures the EMA’s slope in pips per bar, runs that through an arctangent, and plots the result in degrees in its own pane. A reading past 30 degrees means the trend is climbing hard.

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 / 0 / -30)
Plots 3: Angle, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 10

What the Ema Angle Indicator draws on the chart

Angle is a dodger blue histogram in a separate window below the chart, reading in degrees.

Buy and Sell arrows plot at the angle value inside that same pane, not on the price chart.

Reference levels sit at 30, 0 and minus 30 degrees, so the thresholds are visible without reading the inputs.

Nothing appears on the price chart itself.

  • Angle: histogram, dodger blue, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
EMA angle indicator on EURUSD H1 with the degree histogram and threshold markers
EMA angle indicator on EURUSD H1 with the degree histogram and threshold markers

How the Ema Angle Indicator calculates its values

Measuring slope in pips, not price

emaNow and emaPrev come from two iMA calls over `EmaLength`, separated by `SlopeLookback` bars. dyPips converts their difference into pips per bar by dividing by pipSize and then by the lookback. pipSize itself adapts, taking point times ten on a 3 or 5 digit symbol. Working in pips is what makes the same threshold meaningful on EURUSD and USDJPY.

Turning slope into an angle

angle takes MathArctan(dyPips) multiplied by 180 and divided by pi. Arctangent maps any slope onto a bounded range, so a runaway move cannot produce an absurd number. It also compresses the extremes: doubling the pips per bar does not double the angle once you are already steep.

Marking the thresholds

AngleBuf holds the reading for the histogram. BuyBuf and SellBuf receive the same angle value, which is why the arrows sit inside the pane at the height of the reading rather than beside a candle. `BuyThreshold` at `30.0` and `SellThreshold` at `-30.0` set where those markers appear.

How to read the signals

Zero means a flat EMA. The further from zero, the steeper the trend.

The arrows appear in the indicator pane at the angle’s own height, so read them against the level lines.

Because arctangent compresses the extremes, the gap between 40 and 50 degrees represents far more movement than the gap between 0 and 10.

A histogram shrinking back toward zero while price still rises is the trend losing pace.

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

Four channels sit beneath `EnableAlerts`, the master switch: popup through `EnablePopup`, mobile notification through `EnablePush`, email, and a sound file named by `SoundFile`. Popup ships on and the rest ship off. The guard limits output to a single message per closed bar.

Every Ema Angle Indicator input

Core settings

Setting What it does Default
EmaLength EMA length. Length of the average whose slope is measured, default `20`. A longer EMA gives a smoother, shallower angle. 20
BuyThreshold BUY angle threshold (degrees). Degrees above which a buy marker prints, default `30.0`. 30.0
SellThreshold SELL angle threshold (degrees). Degrees below which a sell marker prints, default `-30.0`, mirroring the buy side. -30.0
SlopeLookback slope sample distance (bars). Bars between the two EMA samples, default `1`. Raise it to 3 or 5 for a slope measured over a longer stretch and a calmer histogram. 1

Alert settings

Setting What it does Default
EnableAlerts master alert switch. on
EnablePopup (see inputs panel) on
EnablePush (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
EMA angle indicator inputs: EmaLength, BuyThreshold and SlopeLookback
EMA angle indicator inputs: EmaLength, BuyThreshold and SlopeLookback

Settings that fit your chart

Because the slope is measured in pips, the angle scale depends on how many pips an instrument typically moves per bar. EURUSD H1 is the reference chart, where 30 degrees is a genuinely steep move. On gold or an index the same EMA can produce far larger pip changes, so both thresholds need raising or the histogram sits pinned near its extremes.

When the Ema Angle Indicator fails

The degree scale is not absolute. It depends on pip size and timeframe, so 30 degrees on EURUSD H1 and 30 on XAUUSD M5 describe very different markets.

An EMA slope is a lagging measure. A steep angle confirms a move that has already happened rather than one starting.

With `SlopeLookback` at 1 the reading jumps around bar to bar, which makes the threshold crossings noisy on fast charts.

Copy the compiled Ema Angle 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 Ema Angle Indicator: Foreign Exchange Dealers Coalition on Wikipedia, Intellidex Indices at StockCharts ChartSchool.

Download the Ema Angle Indicator for MT4 and MT5

The zip holds the compiled Ema Angle 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

Why does the Angle plot read in degrees rather than pips?

Because a raw pips-per-bar figure is hard to judge. Arctangent maps it onto a bounded scale where 45 degrees is a natural midpoint and nothing runs away to infinity. It also gives you something you can compare across sessions on the same instrument without rescaling the pane.

Why do the Buy arrows appear in the indicator pane?

Because BuyBuf and SellBuf receive the angle value itself, not a price. This build lives in a separate window, so its buffers plot on the degree scale. The markers sit at the height of the reading that triggered them, which lines them up with the 30 and minus 30 level lines.

Should I change BuyThreshold for gold?

Almost certainly. The angle derives from pips per bar, and gold moves far more pips per bar than EURUSD. At the default `30.0` the histogram on XAUUSD tends to sit beyond the threshold most of the time, which makes the marker meaningless. Raise both thresholds until they mark genuinely unusual readings.

What does raising SlopeLookback do?

It measures the slope across a longer stretch. At the default `1` the reading compares consecutive bars and jumps around. At 5 it compares the EMA now against five bars ago and divides by five, producing a smoother histogram and fewer threshold crossings. The trade-off is a slower response.

Are results guaranteed?

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

Category: this is part of our Trend collection. Also, truly, browse more Trend 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