
Around these normalised candles a long term 2 standard deviation volatility band is drawn. Every opening is set to zero and the absolute move of the day is drawn. The chart shows an indicator which plots the daily move. This is true for daily, weekly and intraday candles. Once the market is moving significantly, everyone hops on and the large move becomes even larger. When looking at any chart, you will surely notice that the large candles tend to close near the high or low. See how you can profit from large daily market moves. Whenever the market shows an exceptional day ranges it is time to take bite. If the edge is not above 50% with a lot of periods, then this prediction will hardly be useful. Observe this with different lengths of history, and you will get a good guess if your market is the right one for this kind of analysis.

From length 7 to length 148 all results would have been positive (a better than 50:50 chance for a rising bar), the best result was obtained with a period of 31. On the chart below, the magenta histogram on the right shows the historic edge (smoothed) over the tested periods for the averages. The indicator can also plot these smoothed results, so you can see the edge the average prediction would offer with different periods. Instead of taking the winning percentage for a given average length, also the 2 results to the left and right are taken into account. To remove outliner results, the statistics are smoothed. Stability of resultsĪs the indicator is based on a statistic over a given period of time, we have to think about stability and outliners. If the indicator is colour coded in red, either the market is not trading above the best average, the best average is not rising, or it would give no edge when trying to predict the next bars move. On the chart above you obviously do not want to use this simple indicator interpretation on a 5 minutes chart. Using the self adjusting average this way, you can easily see in which timeframes or markets a moving average prediction model would be useful. A level of 5 would mean that you got a 55% chance for a rising bar when selecting the best performing period for your moving average and the average is rising and the market trades above it.

The indicator below shows the edge the best moving average would give when trying to predict rising bars.

The chart above shows a comparison of 3 different timeframes. 5 bars to 200 bars), calculate the winning percentage (rising bars) on the next bar, and then pick the best performing period length. The sample implementation (code at the end of the article) will calculate all moving averages within a given parameter range (eg. Instead of just analysing one specific moving average length one could calculate the metrics for all moving averages.

As the chance is better than 50%, I would conclude that the analysed average is a useful one. This will give me a number, and let’s say on 52% of the bars in history when the initial condition was met, the market rose on the day after. To do so, I just count the number of bars which have been rising and falling while (initial condition) the market has been above the average and the average has been rising. This very simple interpretation of a moving average can be quantified, meaning that I can calculate a measure to judge if my assumption is any good. Usually my (simplified) standard interpretation of a moving average is, that when it rises and the market trades above the average, I am in bullish mode and would expect the market to rise over the next bars.
QUANT TRADING STRATEGIES HOW TO
I would like to start this new indicator with some thoughts about how to define how “good” a moving average is. This article will show a way to construct a self optimising moving average, one which automatically adjusts its period to the charted market and timeframe. Different markets and different timeframes will need different moving average periods.
