Slope MA Indicator For Detecting Trends – Trading Strategies – 27 January 2022


  • Slope of the moving average for the past maximum bars
  • regression period
  • slope thresholds
  • Multiple ramp type options
  • See the slope visually as a graph
  • Show/hide dashboard

Calculations and types of slopes:

The slope value is calculated using the perrod slope. Suppose the period is 5, you will check the moving average value of the bar (x) and the bar (x + 5).

Find the angle of inclination between them.

Now in order to calculate an exact angle between two lines, the units of both must be equal. But in trading the units are price and time.

And we need this angle for the slope of MA:

So the exact slope can never be calculated. But these slope values ​​are useful when compared to each other.

We can get a very good idea of ​​the trend and range markets.

Note: the slope is calculated only once per bar. Then the slopes are calculated for the new columns only. This is to prevent repainting.

But if you reload the indicator, then depending on the type of slope selected, repainting may occur. For “graph slope” or “radian slope (normal)”

Types of slopes:

  • True slope (1:1 scheme fixed)

Now, the MT4 chart auto resizes automatically when we move left and right. So it is easier visually. But if we define a scheme with a 1: 1 ratio of characteristics, then the scheme will look much different:

True Regression, it will stop auto scaling for MT4 and fix the 1:1 fixed scale chart.

Find the slope between the moving price and time.

Cons: This option will make scrolling through the graph a little difficult.

  • slope graph (current graph)

This will use the slope of the current graph.

Cons: If the chart is resized and the slope value is reloaded, the slope will change.

Only use this option, if you are only interested in the slope of the current graph. Although the sizing chart is changed:

This release fixes previous issues.

Taking the angle radians: Price – Prev_Price and dividing by the time difference, uses this radian value and converts it into a slope

radians to degrees (atan (slope in radians)) / symbol points

Cons: Different timeframes will have different regression values, even though the moving average looks the same. This is because the points for smaller timeframes are smaller, and for higher timeframes the same point distance is larger.

  • Radian Slope (Normal)

This option normalizes point values. It makes all timeframes have similar slopes by using the ATR value of Slope for M15.

Cons: Because it uses ATR for flattening, the regression values ​​will change slightly over time. So to prevent repainting, the slopes are only calculated once for all columns. Then the new slopes are calculated for only the most recent bars.


Max Previous Bars: Clear the previous bars and draw a histogram showing the MA regression values ​​of the previous bars

Regression period: Calculate the slope of the MA between these bars:

High Slope and Low Slope: Are thresholds. The histogram will turn green/red if the slope exceeds these limits

Ramp type: 4 types as above

ATR period: used for slope leveling in “radio slope leveling”

MA parameters: MA period, MA method, MA Price applied to generate the moving average and the slope is calculated for it

Dashboard Settings: To put the dashboard or show/hide it

All other settings are for alerts and logs.

Leave a Comment