Moving Average Slope Filter: Stress-Tested Across 6 Markets

In my previous video, I used AI to generate a moving average slope filter for an E-mini NASDAQ breakout strategy. The results were impressive – the filter cleaned up the equity curve and removed a significant chunk of bad trades. But one market is never enough to draw real conclusions. You need cross-market validation before you can trust any filter with real money.

So I did exactly that. I took the moving average slope filter and stress-tested it across six different index futures markets: E-mini NASDAQ, E-mini S&P 500, Russell 2000, E-mini Mid-Cap 400, Dow Jones, and the Nikkei 225. The question was simple – does this AI-generated filter concept hold up when you take it outside its original testing environment, or does it fall apart like so many curve-fitted ideas do?

The answer turned out to be somewhere in between, and that is actually more useful than a simple yes or no. If you are building a database of functional filters for your NASDAQ breakout strategies or any other index market, this breakdown will give you a clear picture of where the moving average slope filter works and where it does not.

Watch the full video below, then read on for the complete market-by-market breakdown.

How the Moving Average Slope Filter Works

Before diving into the results, let me quickly recap what this filter does. The concept came from an AI-generated idea I tested in the first video, and it is surprisingly straightforward. You calculate the slope of a moving average by measuring the difference between the current MA value and the MA value a certain number of bars ago. If that slope falls within a defined range – for example, between -15 and +15 – the strategy is allowed to trade. If the slope is outside that range, the strategy sits on the sidelines.

The logic behind it makes sense. When the moving average slope is extreme in either direction, it means the market is in a strong trend. Breakout strategies can struggle during powerful trends because the counter-trend breakout entries are more likely to fail. By keeping the slope within a moderate range, you filter out those high-momentum environments where false breakouts pile up.

On E-mini NASDAQ, the original threshold of -15 to +15 produced excellent results. But here is the critical challenge for cross-market testing: every market has a different price scale. NASDAQ trades at a much higher price level than the S&P 500, which trades at a different level than the Russell 2000, and so on. That means a slope value of 15 means something completely different on each market.

The Testing Methodology

To make this a fair test, I had to adjust two things for each market:

  1. Stop loss size: I used a $1,000 stop loss as my baseline on NASDAQ, then adjusted discretionally for each market based on its typical volatility and point value. This keeps the risk profile roughly comparable across markets.
  2. Slope threshold: Instead of using the same value of 15 everywhere, I optimized the slope input for each market individually. I tested values from 1 to 40 in steps of 1 to find the optimal threshold for each instrument.

This is important to understand. I am not claiming you can slap the same exact settings on every market and expect miracles. That is not how algorithmic trading works. What I am testing is whether the concept of a moving average slope filter adds value across different markets, even if the specific input values need to be calibrated per instrument.

For each market, I compared three key metrics before and after applying the filter: profit factor, average trade size, and overall equity curve shape. A filter is only useful if it improves at least some of these without destroying the trade count entirely.

Market-by-Market Results

Here is the full breakdown of how the moving average slope filter performed across all six index futures markets:

Market Original Profit Factor Filtered Profit Factor Avg Trade Before Avg Trade After Verdict
E-mini NASDAQ (NQ) Strong baseline Fantastic Baseline Significant improvement Excellent
E-mini S&P 500 (ES) 1.26 1.49 $68 $111 Great improvement
Russell 2000 (RTY) 1.25 1.26 Moderate Slight improvement Minor improvement
E-mini Mid-Cap 400 (EMD) Moderate Slightly better $1.14 $1.21 Minor improvement
Dow Jones (YM) Weak No change Weak No change No improvement
Nikkei 225 Decent Worse Decent Worse Got worse

The standout result was the E-mini S&P 500. The profit factor jumped from 1.26 to 1.49, and the average trade nearly doubled from $68 to $111. That is a substantial improvement from a single filter addition. The optimal slope input for the S&P turned out to be 5, which is much tighter than the NASDAQ’s 15 – and that makes sense given the different price scales.

The Russell 2000 and E-mini Mid-Cap both showed minor improvements. Not dramatic, but the filter did not hurt them either. When a filter moves the numbers in the right direction, even slightly, it tells you the underlying concept has merit on that market.

The Dow Jones was a non-starter, but that was not the filter’s fault. The underlying breakout strategy was simply too weak on this market for any filter to rescue it. You cannot filter your way to profitability if the base strategy does not have an edge to begin with.

The Nikkei result was the most interesting negative outcome. The filter actually made things worse, which tells me the slope dynamics work differently on this Japanese index. The Nikkei has unique trading characteristics – different session times, different volatility patterns, different participant behavior – and a filter calibrated on US index logic does not automatically translate.

What a 70% Success Rate Actually Means

Four out of six markets improved with the moving average slope filter. That is roughly a 70% hit rate, and I think that is a genuinely useful score for a filter concept.

Let me put this in perspective. When I evaluate any filter for my strategy portfolio, I am looking for concepts that work across multiple markets, not just the one they were originally designed for. A filter that only works on a single market is almost certainly curve-fitted to that market’s specific price history. But a filter that improves four out of six related markets is showing you something real – a structural relationship between moving average slope and breakout quality that exists across different instruments.

That said, this is not a magical solution. I would not call the moving average slope filter a must-have for every strategy. What I would call it is a solid addition to your database of functional filters. When you are building or refining breakout strategies, having a toolkit of tested filter concepts that you can pull from is incredibly valuable. This filter earned its place in that toolkit.

If you want to understand more about what separates real strategy edges from noise, I recommend watching my video on how I know a strategy is real. The same principles apply to evaluating filters.

Untapped Optimization Potential

One thing I want to emphasize is that I barely scratched the surface of what this filter can do. In this test, I only optimized the slope threshold value (the input range of 1 to 40). There are at least two other dimensions I did not touch:

  • Moving average length: I used the same MA period across all tests. Different MA lengths could capture different trend dynamics and potentially improve results on the markets that showed only minor improvement.
  • Lookback period: The number of bars used to calculate the slope could also be optimized. A shorter lookback captures recent momentum shifts, while a longer lookback captures broader trend changes. Finding the right balance per market could unlock additional edge.

This means the results I showed are essentially a floor, not a ceiling. With proper multi-dimensional optimization – done carefully to avoid overfitting – the moving average slope filter could potentially improve its hit rate from 70% to something even higher. That is a project for a future video.

Key Takeaways for Your Own Testing

If you want to test the moving average slope filter on your own strategies, here are the most important lessons from this experiment:

  • Always calibrate per market. Do not use the same slope threshold on every instrument. Price scales differ, volatility profiles differ, and what counts as a “steep” slope on one market is moderate on another.
  • The base strategy matters. A filter cannot fix a fundamentally weak strategy. The Dow Jones result proved that. Make sure your underlying strategy has a genuine edge before layering filters on top.
  • Cross-market testing is non-negotiable. If I had only tested on NASDAQ, I would have been convinced this filter was perfect. Testing across six markets gave me a much more realistic picture – useful but not universal.
  • Minor improvements still count. The Russell 2000 and EMD results were not dramatic, but they were positive. Small edges compound over time, especially when you are running a portfolio of strategies across multiple markets.
  • Document everything. Keep notes on which inputs work for which markets. When you come back to build new strategies six months from now, having a database of tested filter concepts with market-specific parameters will save you enormous amounts of time.

What Comes Next: AI-Enhanced ADX Testing

The moving average slope filter test was part of a broader series where I am exploring how AI can improve existing technical indicators and filter concepts. The next indicator on my list is the ADX – the Average Directional Index. This is another popular trend strength indicator, and I am curious to see whether AI-generated modifications can improve its performance as a breakout filter in the same way it improved the moving average slope concept.

The pattern I am following is consistent: take a known indicator concept, use AI to generate creative variations or enhancements, then rigorously test those variations across multiple markets. It is a systematic approach to filter development that combines the speed of AI idea generation with the discipline of proper backtesting. Stay tuned for those results.


Want to know which indicators actually work? The Indicators Playbook shares what I found testing 100 indicators across 4,100+ breakout strategies, plus custom indicators I built for my hedge fund. All 11 plays, with code for any platform.