Wednesday, January 27, 2010

Getting there with the VOM

I've made a number of significant changes to the VOM code, and things are looking better.

Here's a shot of six "Random Loser" EAs using the VOM.  At the beginning of each 1M candle, they toss a coin and either enter EURUSD long or short, up to a maximum of three open virtual orders.  I designed them to be a stringent test of the VOM because it has to handle six virtual order requests at once. 

Although 18 virtual orders in total are open, there is only the one position open at sell 0.2 lots, which is the sum of all the virtual orders.



The two real VOM EAs that I mentioned in a recent post have now started trading properly, with screen shots being updates, so that's more of a real-word test.

Saturday, January 16, 2010

VOM update

Well, it turned out to be a bit ambitious to put the VOM V0.2 out there for people to have a look at.  I've had hassles with MT5 build 238, which continually crashed (blew up, atomic bomb style - aka U238?).  That's now fixed I think with build 239.  Also I'm having to look very closely at resource locking, because multiple VOMs are becoming tangled when ticks arrive rapidly.  I could have sworn that I tested all of that before, and maybe I did and the new builds are behaving differently. 

Instead of trying to do something with real EA strategies, I've written a really simple EA that I call "Random_loser" to test the locking process.  5% of the time it buys; 5% it sells, and the rest it does nothing!  Interesting to watch two of them trading together.

Anyhow, with the market closed and no strategy tester yet, I'll be waiting until next week to take another look, which is probably a good thing.

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 MQL5.com 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.