+ Reply to Thread
Results 1 to 3 of 3

Thread: MQL5 Moving Average Crossover System

  1. #1
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    90

    MQL5 Moving Average Crossover System

    At long last the MetaTrader 5 strategy tester has finally been released in MT5 build 268. To celebrate we've ported our example moving average crossover robot to MQL5.

    If you would like to experiment with it, and do some backtests of your own, you can download the beta version of MetaTrader 5 from MetaTrader5.com. Here's the source code for our robot:

    GuruEx03MQ5.zip
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  2. #2
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    90

    Object-Oriented Version

    We've now produced a new version of the EA, using the new object-oriented framework supplied by MetaQuotes as part of MetaTrader 5. The backtest results are the same, but the source code looks very different. Here it is:
    Attached Files
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  3. #3
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    90

    Multi-currency MQL5 moving average crossover system

    Here's a multi-currency version of a basic moving average crossover system, written using the new object-oriented features of MQL5.

    This demonstrates one of the big advantages of MetaTrader 5 over its predecessor. It is now possible to backtest a multi-currency EA!

    This example only uses two pairs, but a quick look at the source code should reveal that it's very easy to extend it to use as many currencies as you like. Here's an equity curve combining GBP/USD with AUD/JPY for the first 3 months of 2010:

    GuruEX03-GU+AJ-2010-Q1.jpg

    GurooMultEx03.zip
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts