Saturday, January 9, 2010

Testing the Virtual Order Manager with hedging orders from two EAs

I have written several times before about writing a Virtual Order Manager to enable hedged trades in MetaTrader 5.  Well, it's been "complete" for about three weeks, but what I underestimated was the amount of testing required.  Nonetheless, I feel it's getting close to release V0.1 time (even this will contain plenty of bugs, I'm sure), so for those who are interested I am publishing a forward test of two EAs re-written to run on it. 
  • The Support Resistance EA which I wrote about in August 2009 and which I have been forward testing for some time on MT4.  You can download the MQL5 VOM code for this here.
  • My first MT5 EA, the FrAMA Cross EA, which I wrote about in October 2009.  You can download the MQL5 VOM code for this here.
Here is a forward test of both EAs running on the one account.
True to my article published on about auto-generating documentation from MQL5 code, here is the draft VOM manual created using Doxygen.  Note that you will need to right-click / save this file on your PC (eg in the MetaTrader 5/Help folder) to view it.  Here are three pictures from the manual which set the scene - the manual discusses them in some detail:

Firstly, a diagram of how an EA interfaces to the VOM


Secondly, a diagram of the VOM modules


... and lastly a screenshot of the VOM tester EA that I have been using to put it through its paces



Here are all the Virtual Order Manager files in beta V0.2.
It's been a very interesting exercise in MQL5 programming and I welcome readers' comments.


  1. Wow! That's a titanic work! But how do I test it? Do I need to download both VOM and one of the two of your EAs? Or can I download VOM and use it with some of my EAs?

  2. Thanks Enivid - it's taken a lot more time than I expected. If you want to add the VOM to one of your EAs then I suggest you model it on the FrAMA Cross EA VOM.mq5

  3. Hi Paul, after finding information on your blog very relevant, I added your blog to my blog list, I hope you don't mind.

    I may not yet be as advanced as you in mql5 but I am learning fast.
    best regards

  4. Happy to have you on board Investeo :)

  5. Nice job...ditto on Enivid's comments...I can't wait to tinker with your VOM and one of my *old* EAs...