Moving average: Exotic use

In this article we will take an in-depth look at one of the most used indicators in the trading world: the MOVING AVERAGE.

In this article we will take an in-depth look at one of the most used indicators in the trading world: the MOVING AVERAGE. We will understand how to use it and on which tools it has greater results. There are various ways to use it from the most classic to the most exotic. We will see an example of the classic way, then we will move on to the more exotic way and then we will focus on which markets it is more convenient to use.


The most frequent use that a trader makes of this indicator is based on the crossing of the same based on different periods

As in this case we see a crossing of moving averages, the faster one crosses from the bottom upwards the slower one generating an input signal, this kind of use is usually done for the detection of Trend or Breakout.

The code I used would be this:


The most exotic use is not so much where the price is in relation to the average or the intersections of the average in relation to another average but to understand HOW MUCH AN AVERAGE PENDERS or its ANGLE.


Because the use made of it is usually very trivial and does not lead to concrete results but with this new use we will be able to understand the strength of prices in relation to the angle of the averages that they will create.

Short example:

You understand that in the first image the opening angle is much more defined than in the second photo, this gives us a confirmation for which there is more strength of Trend in the first example than in the second.

The SLOPE gives us a measure of MOMENTUM and this is where the TREND starts and it is the thing that interests us the most!


To measure the slope of the moving average, I first declared two moving averages of different lengths:

To measure the slope I simply subtracted the mAverage of an hour from the mAverage of 1 candle ago:

If we use the moving average in this way we are looking for a trend, and not all the tools at our disposal present strong and directional trends as there are tools that are typically Trend Follower and others that are typically Reversal, so pay attention to which tools do you use it and on which timeframe!


I have identified 5 different setups of moving averages, now I describe them to you:

  1. Directional: FastSlope greater than a multiplier;
  2. Directional: FastSlope greater than a multiplier AND SlowSlope greater than a multiplier;
  3. Directional: FastSlope greater than FastSlope by 1 bar ago And SlowSlope greater than SlowSlope by 1 bar ago;
  4. Non-directional: Long term we will have a retracement while in the Short period we will have a positive trend;
  5. Non-directional: Long term we will have a definite trend moment while in the Short we will have a retracement;

Of course these only concern long movements but in the script (which you will find on my telegram channel) you will also find the opposite positions in short!

Now we come to the results, I decided to test this engine on the Gold Future, below are some screenshots of the equity.


For these types of Momentum systems I always recommend an exit after a certain number of bars (with an exhausted trend) or a stop loss and take profit of volatility.
Of course, these engine types are suitable for tools that have a breakout / trend follower nature, so don’t expect big results with tools of a different nature.
I remind you that this is not a finite system but only an ENGINE that tries to find and grasp the natures of the underlying.

To have access to the complete code just enter the Telegram group