Specification
The problem:
Our expert advisor is based on trading with too many currency pairs. It works well in real but its very hard to manage results and backtesting is time consuming. So, my idea is to automatize optimization in MT4 on mostly used currency pairs.
Target:
Target is complex system which must fill the time of our high performance computer (prepared for optimizing) and better overview of all results on our website.
We need easily manage all backtests on our webpage. Than we can easily choose and generate .set files for our EA.
Idea:
The system has four parts: Optimizer, Tester, Our Expert Avisor, Our website with MySQL.
Optimizer:
Will manage Expert Advisor MetaTrader 4 optimization proccess.
When optimization of one currency ends it will start optimizing next currency pair (it must loops with 12 pairs).
Our Expert Advisor will save settings and values of each passed backtest to our MySQL database.
Only backtest which successfully passed our predefined criteria (mql function TesterStatistics()) will be inserted to our db.
Tester:
Tester will manage second MetaTrader. It would make detailed test of our optimization results. It must be able to get settings from our MySQL db and must be able to set our EA for retest with Every tick mode.
Our EA will update row with new values in MySQL and will send the image of the chart to FTP. Image must be renamed to statement_{id}.gif where {id} = primary key of our test in database.
Optimizer features:
- We could choose which method of testing will be used: Open prices or Every Tick mode.
- Can download historical data for current test in MT4
- Can change start and end optimizing date ( It needs to be updated every week)
- Optimization will never stop. It continues in a loop (still looping with selected currency pairs.
Tester features:
- Will test with Every Tick mode
- Must be able to get settings for optimization of EA from our MySQL database previously saved by optmimizing.
- It must still wating for new settings if there are no new optimized test in MySQL.
Possible problems:
We are not sure how to save results to database after each optimization and after testing bacuse WebRequest and SendFTP functions does not work in the Strategy Tester.
So, we need your asistance with implementing some DLLs into OnDeinit section of our EA.Each optimization and every test must prepare (download) historical data for selected currency pair.
Lenght of testing period is 3 years from actual date. Date for testing period must be set automaticaly every week.
Others:
We can use login credentials of real user at HotForex which offer good historical data.
Our computer for backtesting is with Windows 7 64bit.
MySQL database is placed on internet (VPS) (MT4 and MySQL is not on the same computer).
Our demands:
It must work without freezing and interrupts for weeks!
We require obtaining source code for custom modifications to prevent future with the unavailability of the author - preffered language for coding is English. Programming language is autor preference.