Jump to content

[REQ] auto-optimizer


Recommended Posts

any body seen this around Sorry for post wrong section 8-) 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 MetaTrader 4 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 Metatrader 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 Metatrader 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 metatrader 4 terminals simultaneously.

 

 

[/codehxxp://[email protected]]
Link to comment
Share on other sites

Re: [REQ] auto-optimizer

 

Yes its been around for ages, here is the link to the original article and code

hxxp://@rticles.mql4.c0m/506

and also a good link to a practice ea with manual for practice optimisation

hxxp://www.f0rex-tsd.c0m/expert-advisors-metatrader-4/19051-glfx-expert-advisor-auto-optimize-ea-1.html

[spoiler:26ukmy10]Never trust, never fear, never beg[/spoiler:26ukmy10]
Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...