Stock Predictor trading strategy

Composite Moving Trend

Composite Moving Trend is a variation of the moving averages crossover that adds a confirmation of the price direction. It uses three moving averages: short (k days), medium (n days) and long (m days).

Strategy group
Moving average strategies
Based on
Three moving averages
Typical parameters
k = 5, n = 10, m = 30 days

The shortest average shows the most recent direction of the price. When it is rising there is a pre-buy condition; the buy is confirmed when the medium average crosses above the long one. The sell works the same way in the opposite direction.

Trading signals

  • Buy when the k-day average is rising and the n-day average crosses above the m-day average.
  • Sell when the k-day average is falling and the n-day average crosses below the m-day average.

Strategy rules

IF MA(n) >= MA(m) AND MA(k)[t] > MA(k)[t-1]
   THEN GO LONG
IF MA(n) < MA(m) AND MA(k)[t] < MA(k)[t-1]
   THEN GO SHORT

Where MA(k), MA(n) and MA(m) are moving averages of the closing price, k < n < m; [t] is today and [t-1] yesterday.

See also: how the Moving Averages indicator is calculated.

Test it in Stock Predictor. Select Composite Moving Trend on the Strategies tab, set the parameters and run the strategy on one stock or a whole group. Pair it with another strategy in a combined strategy.

Backtest results describe past prices and do not guarantee future results. See our disclaimer.