Gold Trend Following Trading Strategy

Gold Trend Following Trading Strategy


A gold futures contracts (@GC) trading strategy built on the proven techniques that made the famous "Turtle Traders" so successful.

This strategy can also be the foundation for creating your own strategies to trade many other types of commodities (oil, silver, copper, etc.)

This is a professional trading strategy, ready for real-world automation or manual trading and includes user adjustable stop-loss orders.

Buy Now


Unlocking the power of trend-following and Turtle Trader techniques.

This trading strategy for Gold futures contracts (@GC) is meticulously crafted on the foundations of trend-following principles, complemented by the time-tested methods of Turtle Traders, renowned for their ability to seize breakouts and capitalizing on breakdowns in prices.

This method has proven to yield some of the most substantial profits in trading, with the potential for holding positions for weeks or even months as gold ascends to new heights.

While tailored for Gold futures contracts, the code for this system can be easily adapted and tested on your commodity of choice and even individual stocks as most markets have similar underlying structures.

This strategy adapts to market volatility through a dynamic position sizing function, providing consistent performance.

Developed and rigorously tested in 2012 using advanced statistical techniques and tools, this strategy has continuously proven its mettle in real-time deployment. Its track record speaks for itself, standing as a testament to its enduring efficacy and reliability.

How It Works

The strategy automatically detects patterns that have historically produced repeatable outcomes that can be exploited as long trading opportunities. These patterns are defined mathematically using large tolerances to minimize curve-fitting to past data.

Parameters used and that can be adjust:

  • X number of days to look back for break-out detection
  • Y number of days to look back for break-down detection
  • Z number of days to look back for trend determination
Gold Trend Following Trading Strategy


  • Adaptive position sizing based on real-time market volatility.
  • Option to manually set position size.
  • Ready for automated trading out of the box.
  • Fully annotated code for easy comprehension.
  • Full transparency with no "black boxes."

What's Included

  • Quick start guide
  • EasyLanguage source code (.eld format)
  • TradeStation Workspace (.tsw format)
  • Full code (.txt format)
  • Life-time strategy updates
Gold Trend Following Trading Strategy

Strategy Specifications

Trading Platform

TradeStation or MultiCharts

Programming Language


Ticker Symbol

@GC (Gold futures contracts)

Trade Types


Trade Execution

Automated or manual

Stop-Loss Orders


Average Trade Duration

10 days

Trades per Year


Percent Profitable


Profit Factor


Signals can also be used for:

GLD and options

Learning From My Code

I think you'll find the following functions of interest to start coding and testing your own strategies!

Implemented Sub-Functions In This Strategy:

  • Trend determination
  • Break-out and Break-down detection
  • Automatic position size calculation based on volatility
  • Open trade management
  • Stop-loss orders based on volatility

Happy Trading!

Buy Now


Do I need a brokerage account to execute the code?

Yes, you'll need an account with either TradeStation or MultiCharts.

Both platforms offer free tier accounts. Simply copy and paste the code into your account to begin.

Is there a quick start guide available?

Yes, I provide a quick start guide that details how to set up the strategy for either manual or automated trading, based on your preference.

Is it necessary to fund the account with real money?

No, real money is not required to utilize the strategy.

It operates in live or simulation mode (your choice), allowing you to analyze trades or use another broker to execute them.

Can I place trades in advance, before the market opens?

Yes, all strategies, except for day trading, generate trade signals at the close of the current trading day.

This feature allows you to set up trades the evening before the market opens, freeing you from having to be at your computer.

Do I need programming skills to use this strategy?

No programming skills are needed. The strategy is ready to use right out of the box.

If you have an interest in learning how to program or have previous coding experience, the open-source code may be of interest to you.

What if I prefer manual trading over auto-trading?

That's perfectly fine. All strategies can toggle between automated and manual trading modes, allowing you to switch anytime according to your preference.

Do trade alerts only occur at the close of a trading bar?

Yes, trade alerts are issued at the close of each trading bar, which triggers a buy or sell order for the next bar.

The length of a bar depends on your trading style: one day for swing trading and a specified number of minutes for day trading.

How are trade alerts provided during manual trading?

In manual trading mode, a notification window appears to inform you of potential trades, allowing you to accept or reject them with a simple click.