I Asked AI to Fix This NASDAQ Strategy

Can artificial intelligence actually improve a trading strategy that already works? That is the question I set out to answer when I took a breakout strategy originally built for the Nikkei market and deployed it on E-mini NASDAQ. The strategy performed reasonably well, but it had a problem that every algorithmic trader knows too well – heavy drawdown periods that eat into your confidence and your account.

Instead of spending hours manually brainstorming filter ideas, I decided to try something different. I turned to Grok3, my current favorite AI tool, and asked it to generate three moving average filter ideas that could reduce false breakouts. The goal of this AI trading strategy experiment was simple: get ideas fast, test them rigorously, and see if any of them actually improve the equity curve.

What happened next was a perfect example of how AI can be both incredibly useful and frustratingly imprecise at the same time. One idea was terrible, one was mediocre, and one showed genuine promise worth exploring further. If you are curious about using AI to enhance your own breakout trading strategies, this breakdown will show you exactly what to expect.

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

The Starting Strategy and Why It Needed Help

The strategy I used for this test was originally developed for the Nikkei market. It is a breakout strategy written in TradeStation code, running on a 60-minute chart. When I deployed it on E-mini NASDAQ, the results were decent – it was profitable and the logic was sound. But the equity curve had some ugly stretches where drawdowns piled up.

Those drawdown periods are exactly where false breakouts do the most damage. The market looks like it is breaking out, the strategy enters, and then price reverses hard. String enough of those together and you get an equity curve that looks like a roller coaster instead of a steady climb. What I needed was a filter that could identify those low-probability environments and keep the strategy on the sidelines.

This is exactly the kind of problem where AI can help. Not by building the strategy from scratch, but by generating filter ideas that a human trader can then test and refine. If you are trading E-mini NASDAQ, you know how important it is to filter out the noise.

The Prompt That Started Everything

I used Grok3 with its “think mode” enabled – this is important because think mode forces the AI to reason through the problem more carefully before answering. Here is the essence of what I told it:

  • I am an algorithmic trader focused on E-mini S&P 500 and E-mini NASDAQ markets
  • I day trade on 30-minute and 60-minute charts
  • My specialty is breakout trading using the Mr. Breakouts Formula
  • I am struggling with false breakouts and need help filtering them out
  • I want three simple but powerful moving average filter ideas with TradeStation code

Prompt engineering matters here. By giving the AI specific context about my trading style, markets, timeframes, and exact needs, I got much more relevant responses than if I had simply asked “give me some trading filters.” That said, the AI still did something I did not want – it combined some filter logic directly with the entry logic instead of keeping them separate. This is a common issue when working with AI on trading code, and it is something you need to watch for.

Idea 1: Moving Average Crossover With Breakout Confirmation

The first AI trading strategy idea used a classic moving average crossover with periods of 10 and 20. Grok combined this with a highest high and lowest low breakout confirmation. The concept was straightforward: only take breakout trades when the fast moving average is above the slow moving average for longs, and below for shorts.

I tested this in several configurations:

  • Fast MA above slow MA as a long filter: Made the strategy noticeably worse. More drawdown, worse equity curve.
  • Reversed condition (fast MA below slow MA for longs): Did not produce anything special. The equity curve was flat and uninteresting.
  • Cross above signal instead of static position: Filtered out far too many trades, leaving almost nothing to work with.

Verdict: Not useful. The moving average crossover is one of the most basic concepts in technical analysis, and in this context, it simply did not add value as a breakout filter. The conditions were either too loose to matter or too tight to let enough trades through.

Idea 2: Moving Average Slope for Trend Strength

The second idea was more interesting. Instead of looking at where the moving average is relative to another moving average, this filter looked at the slope of a single moving average. The calculation was simple: take the difference between the moving average value now and its value 20 bars ago. If the slope is above zero, the trend is up. Below zero, the trend is down.

My initial test with the basic “slope above zero” condition did not produce anything remarkable. But here is where it got interesting – when I started increasing the slope threshold, requiring a steeper trend before taking trades, the results began to improve. The drawdown periods shrank and the equity curve started to smooth out.

This is the kind of result that makes you sit up and pay attention. The idea itself is not complicated, but it has a logical foundation that makes sense: a steep moving average slope indicates strong trend momentum, and breakouts taken in strong momentum environments are more likely to follow through.

I could also see potential for applying this filter on a daily timeframe instead of the 60-minute chart. A daily slope filter could act as a broader market regime detector, only allowing trades when the higher timeframe trend is firmly established. This approach aligns well with how I typically filter bad trades using trend-based logic.

Verdict: Most promising of the three. Saved for further testing and deeper exploration.

Idea 3: Moving Average as Dynamic Support and Resistance

The third AI trading strategy suggestion used an exponential moving average as a dynamic support and resistance level. The filter was simple: for long trades, the close must be above the EMA. For short trades, the close must be below the EMA.

This is about as basic as a moving average filter can get. And the results reflected that – there was no meaningful impact on the drawdown periods that I was trying to fix. The filter was too generic to add any real edge.

Verdict: Not useful. While the concept of dynamic support and resistance has merit in some contexts, as a standalone filter for breakout strategies it did not move the needle.

Comparing All Three AI-Generated Ideas

Filter Idea Concept Impact on Drawdowns Trade Reduction Overall Verdict
MA Crossover (10/20) Fast MA vs slow MA position Made worse or no change Moderate to extreme Not useful
MA Slope Threshold Slope of MA above a minimum value Improved with higher threshold Moderate Promising – saved for further testing
EMA Dynamic S/R Close above/below EMA No meaningful change Low Not useful

Out of three ideas, only one showed real promise. That is actually a decent hit rate when you consider how quickly AI generated all three. Manually brainstorming and coding three filter ideas from scratch would have taken much longer, and there is no guarantee my own ideas would have performed any better.

What This Teaches Us About Using AI for Trading

This experiment reinforced several lessons that I keep coming back to every time I use AI in my trading workflow. If you have seen my previous test where I tested 100 AI-generated trading indicators, you will recognize some of these themes.

AI is an idea generator, not a strategy builder. The value of AI is speed. Grok gave me three coded filter ideas in minutes. But none of them were ready to use out of the box. Every single one required manual testing, tweaking, and critical evaluation. If you treat AI output as a finished product, you will be disappointed.

Prompt engineering directly affects output quality. The more specific and detailed your prompt, the better the AI response. Telling Grok exactly what markets I trade, what timeframes I use, and what my specific problem was (false breakouts) produced far more relevant suggestions than a generic request would have.

Most AI ideas will not work, and that is fine. Two out of three ideas were useless. But the one that showed promise – the moving average slope filter – could become a genuine edge after further optimization. In algorithmic trading, you only need a small percentage of ideas to work out. AI lets you generate and discard ideas at a pace that would be impossible manually.

Always separate the idea from the implementation. Grok mixed filter logic with entry logic in its code, which was not what I asked for. This is a common AI mistake. You need to understand the code well enough to extract the useful concept and implement it correctly within your own framework.

Test on multiple dimensions. I did not just look at net profit. I evaluated each filter based on its impact on drawdowns, trade frequency, equity curve shape, and logical consistency. A filter that boosts profit but increases drawdown is not necessarily an improvement. Rigorous testing across multiple metrics is what separates real edges from curve-fitted illusions.

The Bottom Line on AI Trading Strategy Development

Using AI to improve your trading strategies is not magic, but it is genuinely useful when you approach it correctly. The key is to use AI as a brainstorming partner that generates ideas at scale, then apply your own trading knowledge and testing discipline to separate the signal from the noise.

In this case, the moving average slope filter showed enough promise to warrant deeper investigation. I plan to test it across different timeframes, different slope thresholds, and potentially on a daily chart as a regime filter. That kind of iterative refinement is where the real value of AI-assisted trading strategy development lives – not in the first output, but in the ideas it sparks that you can then develop into something genuinely useful.


Want more profit from the strategies you already trade? The Double Your Profits Playbook shows you 10 plays to pull more out of your existing strategies without adding risk, with real examples and code for any platform.