Unlocking Automated Trading with the Combo System for MetaTrader 4

Mike 2008.03.06 18:44 64 0 0
Attachments

Hey fellow traders! Today, I want to dive into an exciting automated trading system (ATS) known as the Combo System for MetaTrader 4. So, let’s get into the nuts and bolts of how this system can enhance your trading experience.

What's the Concept Behind the Combo System?

Imagine this: we start with a basic trading system (let's call it BTS) and aim to amp it up by teaching a neural network (NN) to handle tasks that our BTS simply can't manage. The goal here is to create a powerful duo of trading systems—our trusty BTS alongside the smart NN.

To put it plainly, there’s no need to reinvent the wheel. Why train someone to sprint if you can just hop in a car? Similarly, why stick to one strategy when we can pair a trend-following ATS with a countertrend strategy?

Combining Forces: Trend-Following & Countertrend

With a trend-following ATS in our toolkit, we also need to teach our neural network how to recognize countertrend opportunities. This is crucial because a trend-based system may struggle when the market goes sideways or when it experiences pullbacks. Instead of running two separate ATSs on the same chart, we can teach the NN to complement our existing setup.

How Does the Neural Network Work?

We designed a two-layer NN, featuring two perceptrons in the lower layer and one in the upper layer. The output can land in one of three states:

  • Entering the market with a long position
  • Entering the market with a short position
  • Indeterminate state (passing control back to the BTS)

Teaching the Neural Network

The training of the NN unfolds in three stages, with each stage focusing on a different perceptron. It's essential to have our optimized BTS running to guide the perceptrons effectively.

Let’s walk through the stages:

Stage 1: Optimizing the BTS

We kick things off by setting our initial deposit at $1,000,000 to avoid any artificial margin calls during optimization. The first input we’ll optimize is labeled “Balance” in our Expert Advisor (EA) properties.

Under the Inputs tab, we’ll set the position volume to 1 for the identifier “lots.” The optimization will be done with the model: “Open prices only,” which is the fastest method available.

Stage 2: Training the Short Position Perceptron

Next, we set the input “pass” to 2 and check only those inputs ending in 2 for optimization:

  • x12, x22, x32, x42 - weights for short positions
  • tp2 - TakeProfit for short positions
  • sl2 - StopLoss for short positions
  • p2 - analysis period for price differences

Stage 3: Training the Long Position Perceptron

For this stage, we set “pass” to 3 and check inputs that end in 3:

  • x13, x23, x33, x43 - weights for long positions
  • tp3 - TakeProfit for long positions
  • sl3 - StopLoss for long positions
  • p3 - analysis period for price differences

Stage 4: Finalizing the Neural Network Training

In the final stage, we set “pass” to 4 and check inputs that end in 4:

  • x14, x24, x34, x44 - weights for the upper layer perceptron
  • p4 - analysis period for price differences

Wrapping Up

And there you have it! Once all stages are completed, your neural network is ready to roll. Remember, the ATS also includes a unique magic number, which keeps your orders distinct from those initiated manually or by other ATSs.

Final Thoughts

  • Always ensure your initial deposit covers any potential drawdowns.
  • The EA provided in the source code is unoptimized.
  • For modifications, update the basicTradingSystem() function as needed.
  • For hassle-free optimization, download the combo.set file and place it in your MT4 tester folder.
  • Re-optimize your EA on weekends only if the previous week’s results were unprofitable.

Happy trading!

List
Comments 0