MT4 Indicator Central
Trend & Momentum Free · MIT

Moving Average Slope Indicator for MT4

Category
Trend & Momentum
Platform
MetaTrader 4
Repaints?
See the honest review below
Licence
MIT
Inputs
5
Price
Free
MetaTrader 4 chart with the Moving Average Slope indicator in a sub-window, plotting a blue line that crosses above and below a zero baseline to show the moving average rising and falling.
Moving Average Slope in MetaTrader 4. Open-source (MIT), by Keisuke Iwabuchi.
// at a glance

Moving Average Slope is a free MT4 indicator that measures the per-bar change in a moving average and plots it in a separate window around a zero line. Above zero the MA is rising, below zero it is falling, and the distance from zero shows how steeply. It is for traders who want a clean read on trend direction and flattening.

The Moving Average Slope indicator for MT4 takes any moving average you choose and turns its angle into a single curve in a sub-window. Instead of eyeballing whether your MA is tilting up, flat, or rolling over, you get a number that crosses a zero line and tells you exactly that.

What is Moving Average Slope, and what does it do in MT4?

Moving Average Slope is a separate-window MetaTrader 4 indicator by Keisuke Iwabuchi (MIT licensed, 2017) that calculates the slope, or rate of change, of a moving average and draws it as a line oscillating around zero. When the line is above zero the underlying MA is rising bar to bar; when it is below zero the MA is falling. The further the line sits from zero, the steeper the MA, which corresponds to a stronger, faster-moving trend.

It is a derived study, not a price overlay. You still pick the moving average you care about (period, method, and applied price), and the indicator reports how that average is changing rather than where price will go. Think of it as a tidy, always-visible answer to is my moving average pointing up or down, and how hard.

On every bar the indicator computes your chosen moving average twice using the built-in iMA function: once at the current bar and once slope_period bars earlier. It subtracts the older value from the newer one and divides by slope_period. In plain terms, slope = (MA_now - MA_then) / slope_period, which is the average change in the MA per bar over that window. That value becomes the plotted point for the bar.

The result is drawn in a separate sub-window as a line (colored DodgerBlue by default) that crosses a zero baseline. A positive reading means the MA gained ground over the lookback, a negative reading means it lost ground, and a value near zero means the MA has gone flat. Because the figure is scaled in raw price units divided by bars, its size depends on the instrument and timeframe, so you read it relative to its own recent range rather than against a fixed threshold.

One honest note on behavior: the value for the current, still-forming bar is recalculated on each tick because the moving average for that bar keeps updating until the candle closes. The reading for the live bar can therefore shift before it settles. Closed bars do not change.

Which Moving Average Slope inputs matter most?

The inputs map directly to a standard MT4 moving average plus one extra control for the slope window. These are the real parameters from the indicator, with their default values.

InputDefaultWhat it controls
slope_period1How many bars back to measure the MA change against. 1 gives the bar-to-bar slope (most responsive but noisiest); larger values smooth the reading and reduce whipsaw. Must be greater than 0 or the indicator refuses to load.
ma_period20The number of bars in the underlying moving average. Higher values produce a slower, smoother MA and therefore a calmer slope; lower values react faster.
ma_shift0Horizontal shift applied to the moving average before the slope is taken, matching MT4's standard MA shift input. Left at 0 for most uses.
ma_method0The averaging method: 0 = SMA, 1 = EMA, 2 = SMMA, 3 = LWMA. EMA and LWMA react faster, SMA and SMMA are smoother.
ma_price0Applied price for the MA: 0 = Close, 1 = Open, 2 = High, 3 = Low, 4 = Median, 5 = Typical, 6 = Weighted Close. Close is the usual choice.

How do you add Moving Average Slope to MetaTrader 4?

  1. Unzip the download so you have the indicator's .mq4 file ready to copy.
  2. In MetaTrader 4, click File, then Open Data Folder.
  3. Open the MQL4 folder, then the Indicators folder inside it.
  4. Copy the indicator file from the zip into that Indicators folder.
  5. Back in MT4, right-click Indicators in the Navigator panel and choose Refresh, or restart the terminal.
  6. Drag the indicator from the Navigator onto a chart, adjust the inputs if needed, and click OK.
  7. Confirm the slope curve appears in a sub-window below price.

Where does Moving Average Slope help, and where does it fall short?

What Moving Average Slope does well, and where it falls short, with nothing hidden.

  • Free and MIT licensed, so you can use, study, and modify the single .mq4 file without restriction.
  • Tiny and lightweight, one buffer and one iMA call per bar, so it adds no meaningful load even on slow machines or many charts.
  • Gives a clean, objective read on whether your moving average is rising, flat, or falling, which is easy to misjudge by eye on a busy chart.
  • Fully configurable to any MA you already trade, including period, method (SMA, EMA, SMMA, LWMA), applied price, and shift.
  • The slope_period input lets you trade off responsiveness against smoothness without changing the underlying MA.
  • It is a derived trend gauge, not a signal generator or predictor; it tells you what the MA is doing now, not what price will do next.
  • Like any moving-average study it lags price, and a longer ma_period increases that lag.
  • There is no fixed scale or built-in threshold, so a reading is only meaningful relative to its own recent range and differs across symbols and timeframes.
  • The default plot is a line, not the histogram the name might suggest, so there is no color-coded bar styling out of the box.
  • The current bar's value updates tick by tick until the candle closes, so live readings can shift before they settle.
  • No alerts, arrows, or on-screen labels; you read it visually or wire it into your own EA or template.
// free download

Download Moving Average Slope free

Enter your email and we will send you Moving Average Slope for MetaTrader 4, packaged with its original MIT licence and a credit to Keisuke Iwabuchi. Come back for any of the other free tools whenever you want one.

We never share or sell your email. One-click unsubscribe in every message.

Moving Average Slope: questions traders ask

Does the Moving Average Slope indicator repaint?

Closed bars do not change. The only moving value is the current, unfinished bar, which recalculates on each tick because the moving average for that bar is still forming. Once the candle closes, its slope reading is fixed.

Does it place trades or give buy and sell signals?

No. It is an analytical study that only plots the slope of a moving average. It does not open, close, or manage any orders, and it draws no arrows or signals. You interpret it yourself or feed it into your own system.

Will it run on MT5?

No. This is an MT4 indicator written in MQL4. It will not load in MetaTrader 5 without being rewritten for that platform.

Is it really free?

Yes. It is released under the MIT license by Keisuke Iwabuchi (2017), so you can use and modify it freely. MT4 Indicator Central did not author it and simply provides it as part of a free library.

Why is my reading a tiny decimal or a large number?

The slope is raw price change per bar, so its size depends on the symbol's pricing and the timeframe. Read it relative to its own recent swings rather than against a fixed level, or use a larger slope_period or ma_period to calm it down.

It is called a slope but it draws a line, not a histogram. Is that a bug?

No. The default style is a single DodgerBlue line in a sub-window. The value still represents the MA's slope around a zero baseline; only the drawing style differs from a bar histogram.


More free MT4 tools