Automatic optimization after each trade - I will pay for this solution!

 
Hi,

I have a system (EA) that I want to trade live but I don't want to sit in front of the screen and do this whole stuff manually.
The system needs to be optimized after each trade and continue the automatic trading with new values. I heard WinExec or some other DLL call might be able to do this. I'm not a professional.
I trade 5-10 pairs and each trade usually takes at least 2-3 days so there's time to run the optimization backtests. The key is to use the best values of the results for future trades, and repeat this after each trade of a pair. Of course if I trade EUR/USD and GBP/USD at the same time, when euro closes one trade there's no need to run a backtest on G/U too, just the euro.
So basicly here's what I need: some built-in feature to my EA to call the external strategy tester after each trade, run the test and pick the best values and use them during the next trade. All this automatically without ANY manual intervention.
I'm interested in EVERY possible solution, I have a dedicated Windows server to run this stuff only. I will pay for the best solution if it really works as desired. Please quote your price and an outline how would you work this out.

Thanks.
 
 
Thanks Rosh, though I will have to learn russian to understand that, because these kind of phrases don't mean a lot to me: "There is the assumption that the expert with the urged under the history parameters there will be the first time, albeit the sufficiently brief, is profitable to deal."
I will try to read the document somehow though, it seems to have the exact solution to my problem.
 
You're welcome. This article explain how to optimize the expert advisor once at day and night. You can change algorithm to do optimization after each order closing.
 
Rosh, this topic can be closed on my behalf now. I don't want any misunderstanding with others because I will try to implement this technique myself now.
 

Dear MetaQuotes Organization, is it possible to integrate this function in the EA that will be used in the automatic championship? I mean, it will take probably an amount of CPU of the server during the optimization, and it will optimize at least 1 time everyday, so, because the EA will stay on your servers, i just want to ask if there is a problem for you?

 
Maybe not.
 
w4rn1ng:

Dear MetaQuotes Organization, is it possible to integrate this function in the EA that will be used in the automatic championship? I mean, it will take probably an amount of CPU of the server during the optimization, and it will optimize at least 1 time everyday, so, because the EA will stay on your servers, i just want to ask if there is a problem for you?

Such expert may be stopped according Rules of ATC 2007:

Experts can contain limitations to be used outside the Championship, but they must:
  • work normally and be tested on the whole interval of year 2007 (for portfolio strategies no history testing is necessary, a simple description will be enough)
  • work normally in accounts numbered from 500 000 to 510 000
  • work normally with demo accounts opened on the server of demo.metaquotes.net:443
  • properly consider symbol settings without rigidly specified parameters (limitations on lots, spreads, minimal deviation from the market price, etc.)
  • never contain any critical bugs (like looping or hanging up, etc.) or explicitly harmful actions in the code
  • be economical with the use of resources on the processor and PC memory
 

 Great article.


 I need clarification on the last text line below. What folder? Where is new place established in it?


 Thanking you in advance,


Wackena



Copy of text from article.


Installation of the auto-optimizer


For the accomplishment of mission it is necessary:


to copy MACD Sample_1..mq4 into folder expert of the established and connected to the Internet terminal MetaTrader.  

to make a copy of folder with the terminal MetaTrader into the new place established in it.

 

One of my variable requires a floating point number. I've noticed that if one of the 4 optimization variables is a double data type, it produces a divide by zero in the Experts tab.

This code has divide by zero error.

extern int     StartTime         = 23;
extern int     HiLi              = 28;
extern int     LoLi              = 10;
extern double  avg               = 2.7;
 
StartTime     =GlobalVariableGet(Per1);
HiLi          =GlobalVariableGet(Per2);
LoLi          =GlobalVariableGet(Per3);
avg           =GlobalVariableGet(Per4);

The error is corrected when;

extern double  avg               = 2.7

is changed to;

extern int  avg               = 3

or;

avg           =GlobalVariableGet(Per4);

is commented out;

// avg           =GlobalVariableGet(Per4);
Wackena
Reason: