Who Knew Day Trading Gold Was This Easy

You can day trade gold with only 3 lines of code if you know exactly when a strange quirk in price shows up.

This phenomenon in gold is so unique that I haven't seen anyone else talk about it.

And I almost completely missed it if it hadn't been for a lucky fluke of observation.

Let's take a deep dive into how you can pull gains from the gold market with incredible ease.


I Want To Day Trade Gold With Math

If you've read some of my other posts, you'll know I always test my trading ideas first before risking a dime; and I highly recommend you do the same.

(It's your hard-earned money on the line after all, why not be extremely thorough?)

But before I can test if an idea will make or lose money, I first must come up with a trading hypothesis.

All my systems start with observations about the way prices move, and in 2012, I started noticing that gold's price would often rise Friday afternoons.

Maybe funds were hedging their bets over the weekend, or maybe foreign governments were executing their gold purchase plans.

I try not to think too much about the "why" something is happening - I just want to make money.

So, I dived deeper into gold's Friday price movements using scientific analysis not "technical analysis" (which doesn't work).

Scientific Analysis of Gold's Price Movements

Using my computer science background, I wrote a simple program to calculate gold's hourly percentage movements.

I then ran this program over every Friday all the way back to 2002, and the results I averaged together.

I wanted to quickly validate if there was a time of day on Friday that had a bias to the upside.

This is what my program spit out (gold futures trade around the clock):

gold time of day returns

Gold's time of day performance over the last two decades

The computer told me there was a small window of time on Fridays when gold's prices would rise.

This window of time was from 3 pm to 5 pm, local exchange time.

If you couldn't tell, I'm a big fan of "tested analysis" not "technical analysis".

I tell other traders all the time to run away from anyone drawing lines on charts - you need to be more scientific if you want to make the big bucks.

To Day Trade Gold You Need to Be a Nerd

Call me a groupie.  

I cannot overemphasize this; I can't get enough of testing trading ideas.

It's the main reason I don't trust a word of what other traders say because 99% of them never test a damn thing.

And sadly, most Mom and Pop traders haven't adequately tested their ideas either because their trading rules are simply too loose, too subjective, too haphazard and sad to say, downright hopeless. 

The majority of traders are completely misguided as to the inner workings of the financial markets. 

(Much like people used to think that the earth was flat, most traders believe prices are moved by fundamental information).

The solution is for more traders to get out of their own way.

They need to let a computer find trading systems and prove they work first.

That's exactly what the most successful traders in the world have done and continue to do.

Code Line 1: What's the Best Time to Buy Gold?

The results of my first program said there was a window of time that gold's prices might rise.

But at exactly what time was the best to buy gold for a day trade?

Once again, I went to the keyboard and wrote up another program.  

This one stepped through each 15-minute period of each Friday looking for the optimal time to buy gold.

The output of this code said that 2:15 pm (14:15) local exchange time was the best.

What does that look like in simple pseudo-code?

if time = 14:15 AND...

Code Line 2: Gold Needs to Be Trending Higher

At first, however, I was not too impressed with the results of day trading gold at 2:15 pm.  

There were too many times gold would fall instead of rise through the rest of Friday afternoon.

So, scratching my head a little bit, and I hypothesized that if gold is a trending market (i.e., it like to move in one direction for a period of time) that maybe I should only buy gold if it is already moving higher.

A very simple way to determine if something is moving up or down is with a moving average.

In this case I used a simple moving average and told the computer to only buy gold on Fridays at 2:15pm if its price was above a moving average:

if price >= average price of the last X periods then BUY

Code Line 3: When to Sell Gold?

Lastly, I needed to know when to sell gold.

I've often noticed that it's easier to buy something than it is to sell it.

Maybe you've felt the same way before.  How many times have you held onto a position longer than you should have?

It's the selling part of trading that's so hard to do, and why so many traders get into serious trouble.

So once again, I made the computer tell me when I should sell.

I didn't want to "eyeball" the charts and guess.

I wanted to know exactly, in black and white, when I should sell the shares of gold I had bought at 2:15pm.

After running the program over every Friday since 2002, the program said 6:15pm Sunday evening (when the gold market opens back up) was absolutely the best time to sell:

if time >= 18:15 then SELL

Let's put all three of these lines of code together and see what this day trading gold system looks like when traded all the way back to the year 2002.

The Gold Day Trading System Overview:

Day Trading Gold

Gold Day Trading System Example

Day Trading Gold Equity Curve

Gold Day Trading System Equity Curve

Gold Day Trading Stats

Gold Day Trading Statistics

You don't need to hit a few trading grand slams to make a fortune.

All you need are small base hits.

This system is unbelievably simple.

My philosophy about trading models is "simpler the better"!  

Simple works and simple is robust.  

Robust systems are more likely to continue working in the future.  

Trade smart and stay relaxed!

Conclusion: How to Day Trade Gold

  • There is a repeatable upward bias in gold Friday afternoons into Sunday evening
  • Code line 1: If time = 14:15 AND
  • Code line 2: If price >= average price of the last X periods then BUY
  • Code line 3: If time >= 18:15 then SELL
  • Remember to always test your ideas before trading them

Free TradeStation and MultiCharts Code:

Gold Day Trading System Code

Gold Day Trading System Code

About the Author

Hello! I'm Kurt the "Relaxed Trader" writing the stuff on this website. Feel free to ask me questions. I love talking to fellow traders that want to use computers to beat the stock market. Shoot me an email: Kurt@relaxedtrader.com

Leave a Reply 2 comments