Here's a new QQQ swing trading strategy if you want to swing trade the NASDAQ instead of the S&P 500.

In another post, I laid out a simple SPY swing trading strategy, requiring only basic counting, but now, we're going to dive even deeper.

Let's check out this new swing strategy together.

More...

## Do You Want to Be Right or Do You Want to Make Money?

As you may already know, I'm all about relaxation.

Life is way too complicated to add more anxiety or drama.

Life should be a drama-free zone.

And what's the number one way to add anxiety to your trading life?

Trading against the trend!

Seems like every new trader I meet is all about conspiracy theories, how the "fix is in" and how the stock market is going to crash to zero.

These people LOVE to "call tops" and short stocks in bull markets.

I know because I was once one of these fools.

When I first started trading, I thought I was smarter than the average bear and just couldn't stop shorting.

Looking back, I have no idea why.

I guess it was just to prove "I was right" to my friends.

But it never worked, I lost money hand over fist, again and again, and again, never learning my lesson.

Then, out of nowhere, it hit me...

**Do I want to be right, o****r do I want to make money?**

Sounds so simple, doesn't it?

It was a life-changing moment.

I immediately flipped my thinking and my trading, no longer fighting against the trend, but using the trend in my favor.

And life got so much easier!

## The Trend Is Your Friend Till The End

I harp so much on trading with the trend because it really is that important.

If you want to make money, you have to trade with the trend, i.e. buy dips when the market is going up, and short rallies when the market is going down.

But how do we determine trends?

Good question, glad you asked.

Most traders use a simple moving average to determine trends.

If the price is above say, the 200-day moving average, QQQ is moving up and in an **uptrend**.

If it's under, QQQ is moving down and in a **downtrend**.

Axiomatic.

But here's the rub, EVERYONE on Wall St. uses the 200-day moving average.

We want to do things a little differently, so our trading strategy is a bit more robust and not mined to death like the 200-day average is.

But before we get into that, let's recap, what have we learned?

**Only buy dips in up-trending (bull) markets****Only short rallies in down-trending (bear) markets**

## QQQ Trading Strategy With a Twist

Here's where it's going to get a little weird for a second.

If the 200-day moving average is mined out what do we do?

How about an average, of an average, of an average?

Woah!

Mind blow.

Not many people will have thought to do that, trust me, and it will keep our QQQ trading strategy away from over-optimization because the idea is so strange.

But what does that even look like?

Well in code (which you know is how I test all my trading ideas) it would look like this:

```
moving_average_1 = average( close , variable_1 );
moving_average_2 = average( moving_average_1, variable_1);
moving_average_3 = average( moving_average_2, variable_1);
```

**Notice how we are passing the first average as an input to the second average which then feeds the third average?**

The variable in all this is the number of days we want to average over, and we keep that constant throughout the equations.

This now gives us three different moving averages, but all controlled by ONE variable that we can play with.

Now, using these three averages, we can determine trends in a new and novel way.

Prices are going up if:

```
moving_average_1 > moving_average_2 and
moving_average_2 > moving_average_3 and
close > moving_average_3
```

**And prices are going down if the logic is flipped backward:**

```
moving_average_1 < moving_average_2 and
moving_average_2 < moving_average_3 and
close < moving_average_3
```

## The QQQ Trading Strategy Secret Sauce

OK, we've got a novel way to define trends, but how do we know exactly when to buy or short?

Cue my favorite friend, mean reversion.

You've got to study up on mean reversion if you want to trade SPY, QQQ or most stocks.

I've written previously about how mean reversion has been the **defining force in the stock market since 1982**, when index futures were introduced, effectively killing "technical analysis".

Keeping it simple, markets, like the NASDAQ and S&P 500, mean revert around, you guessed it, a "mean".

Making it even more simple, the markets now move up and down around this mean price (which changes from day to day).

You know what a mean is already, it's just an average over some period or number of samples.

And on certain time frames, these markets will move around their mean prices.

**A great way to measure the mean of QQQ or SPY is just by using the 5-day moving average.**

Now we have a new way to define a "dip" in prices, it will just be when QQQ is below its mean, by a certain amount.

Let's recap again, for up-trends (rules would be reversed for down-trends):

Only buy when QQQ is above all three moving averages AND when QQQ is below its mean by a certain amount.

## Finding the Sweet Spot to Buy QQQ

Phew!

If you made it this far, good job, it's almost over, I swear.

Next, we're going to define a dip for a computer to understand.

It looks something like this:

```
close < average( close, 5 ) - variable_2 * atr
```

Average true range, or ATR, is something I've written about before, you might want to grab a refresher.

Basically, ATR gives us a standard way to measure current price fluctuations.

**Variable_2** gives us a knob, if you will, to fine-tune where we place our buy orders.

Put in a small number and the buy zone gets closer to the mean, put in a large number and it gets farther away.

This really is "the secret sauce".

It might seem straightforward now, but it took me YEARS to figure this part out.

Before I was using dumb indicators like RSI, MACD, and Stochastics to tell me when prices had dropped enough to be a buyer.

But all those indicators do is take in price and massage it into pretty graphs, they don't tell you anything you don't already know by looking at price.

So why not use price itself?

I previously wrote about how the MACD indicator is completely backward... but I digress.

Now, how do we know when to sell when QQQ mean-reverts to the upside?

Well, we just sell when the price gets above the mean, by a certain amount, using ATR again.

## The QQQ Swing Trading Strategy Pseudo Code

Let's tie a big bow on this whole QQQ trading strategy, shall we?

Let's write down the basic rules in pseudo-code:

```
Buy If
moving_average_1 > moving_average_2 and
moving_average_2 > moving_average_3 and
close > moving_average_3 and
close < average of 5 days - x * atr
Sell If
close > average of 5 days + y * atr
```

Bam!

There we have it folks, a more intricate way to swing trade QQQ, and SPY if you are interested.

Now let's finish up this post by looking at the performance charts and statistics for this QQQ trading strategy.

Happy trading!

## Want The Code?

Start using this exact trading strategy today!

The results of the QQQ are impressive. The formula posted does not shoe data what is MA 1, MA2 and MA#? Thanks

Hi Kurt,

Great article, thanks for giving me something to consider for swing trading my Roth 401k. Can you please share the value(s) you typically use for variable_2 in the formula from the article?

close < average( close, 5 ) – variable_2 * atr

I made a simple indicator in TradingView to see how it would work out and it looks like you have to use a value that is <= 1, otherwise price will never close out of the mean reversion range. Does that sound correct?

Thanks,

Ken

Would you be so kind as to simplify this for those of using Tradingview (Pinescript)??

I used to program back in the early 90’s (think DOS 6.x and C language, but have forgotten every aspect of it.

Hi.

Great article!

What’s the value you are using for variable_1? You not are using 200, right?

Hi Kurt,

Just wanted to say thanks very much for your blog, i've been in the industry for a long time and wish I had the ability to code to a decent level as I love the process driven/fact based approach to your research rather than relying on only experience and discretion.

I just wish you were able to churn out even more articles and Youtube videos as I love reading them and look forward to new videos.

Hi Tom!

Many thanks for the warm feedback.

I really appreciate that you enjoy the same fact-based approach to trading/investing as I do.

Don’t worry, many more articles/videos are on the way!

Talk soon.

Cheers!

-Kurt

Hi Tom & Kurt,

I am to an extent Tom’s mirror… I am a programmer who has been involved in coding market related software for nearly 40yrs.. enough about me..

Kurt I am impressed with your factual approach to educating traders.. Thank you a great no nonsense approach. Young and old traders of this generation will benefit if they will just spend the time to listen to you.

Tom, if Kurt is not able to help you code your processes find a way to contact me.. Coding trading processes is my passion.

Cheers 🍻

Andy

Hello Kurt, I’m a bit confused about your xaverage computation for the moving average.

From what I’d gathered, the MA is a time series calculation and thus, the “Close” would be the first item in the array.

And then, it would move down the array with each index being an older price bar on the chart.

So in effect, are you calculating the difference of 20 index displacements between the Close in ma1_long vs ma2_long & ma3_long?

Hey Kurt,

I was wondering what 3 MA you use

Hi Mike,

You could put in a simple stop based on average true range.

Say, the market moves lower than a certain number of ATR’s your stop would be hit.

But this is just a simple strategy (designed for educational purposes) around the mean reversion principle of index markets without a stop.