Home | MT4 Tools

Installation and Usage

AutoOptimizer

1. Create new folder AutoOptimization on disc C (or create folder with your own name in your own place)
2. Copy MTester.exe and StartMTester.exe to folder AutoOptimization
3. Add strings to Expert Advisor code:
extern int OptimAuto=1; // 0- switch off 1- switch on auto optimization extern string OptimEveryTime="10.45"; // auto optimization start time (local PC time)
extern string OptimEveryWeek="1,2,3,4,5,6,7"; // day (1 –Monday etc.)
extern string OptimEveryMonth="10,20,30"; // day of month
extern int OptimPeriod=30; // period for optimization, day
You can find example: MACD Sample.mq4 file

forex software code editor

 

Quick help. How to add strings to Expert Advisor code?
1. Press F4 and Meta Editor window should open.
2. Press Ctrl+O and select expert Advisor's file. Source code of selected expert advisor should be loaded.
3. Insert strings:
extern int OptimAuto=1; // 0- switch off 1- switch on auto optimization extern string OptimEveryTime="10.45"; // auto optimization start time (local time)
extern string OptimEveryWeek="1,6,7"; // day (1 –Monday etc.)
extern string OptimEveryMonth="10,20,30"; // day of month
extern int OptimPeriod=30; // period for optimization, day
before “int start()” operator
4. Press F5

4. Add Expert advisor to chart and set OptimAuto=1 and set optimization time according your needs. You must specify the time in 24 hours format. For example 1.30 pm you should set 13:30

forex expert advisor

5. Run MTester.exe file
6. AutoOptimazer should create folders automatically:

Folders:

HTML_TESTER optimization reports (with data and time)
LOG_TESTER log files for program
RUN_TESTER log files for experts
SET_TESTER *.set files for optimization
Files in these directories are placed in subdirectories under the names MT4 terminals.

For example:

forex software folders

 

7. Open strategy tester and create and save .set file with optimization parameters to folder “SET_TESTER” sub folder “your MT4 name”
File name should be: expert advisor name+'_'+currency+'_'+ timeframe+'.set'

For example for MACD Sample.mq4 currency EURUSD time frame H1 file name should be:
MACD Sample_eurusd_h1.set
If the tester (later) will not find it appropriate expert SET file it will display a warning and it will display a correct name for set file.
Example:
If you would like to optimize StopLoss from 4 pips to 10 pips with step 1; TakeProfit from 20 pips to 100 pips with step 1; every 1 day of month on 10.45am. Optimization period 30 days.
You should set:
StopLoss start 4 step 1 stop 10
TakeProfit start 20 step 1 stop 100
OptimEveryTime 10.45
OptimEveryWeek 1
OptimEveryMonth 1
OptimPeriod 30
And save set file to folder “SET_TESTER” sub folder “your MT4 name”

expert advisor setting

8. Add StartMTester.exe to Startup

Quick help. Run a program automatically when Windows starts
If you always open the same programs after starting your computer, such as a web
browser or e-mail program, you might find it convenient to have them start automatically when you start Windows. Programs or shortcuts placed in the Startup folder will run whenever Windows starts.
1. Click the Start button , click All Programs, right-click the Startup folder, and then click Open.
2. Open the location that contains the item to which you want to create a shortcut.
3. Right-click the item, and then click Create Shortcut. The new shortcut appears in the same location as the original item.
4. Drag the shortcut into the Startup folder.

The next time you start Windows, the program will run automatically.
This tool (AutoOptimizer) can work with several currencies and several MT4 terminals simultaneously.

Home | MT4 Tools

 

2005-2009 BJF Trading Group
http:// www.iticsoftware.com

MetaTrader®, MetaQuotes®,MQL4®,MQL5®, MT4®, MT5® is a trademark of Metaquotes® www.metaquotes.net