Installing and Using Strategy DLL’s in ForexTester

A ForexTester strategy will be supplied to you as a Windows DLL library, so a file with a .dll suffix.

To Install

1. Shut down your copy of ForexTester

2. Find the folder where ForexTester is installed. This is usually something like
C:ForexTester3
(or C:ForexTester2 if you’re running the older version)

3. Find the Strategies sub-folder (so C:ForexTester3Strategies for example) and copy the the dll file there.

4. Re-start ForexTester and bring up the Strategies List dialog box by using the Testing | Strategies List menu option (note there is also a toolbar button to do this as well).

A typical Strategies List dialog box

5. Look for the strategy that you are choosing to install in the list. If you cannot see it then look on the Journals tab to see if there are any error messages explaining why it can’t find or load the DLL.

6. Once you’ve found the Strategy, click on it to highlight it (it turns yellow) and then click on the Properties button to bring up the Strategy Properties dialog box for your strategy. Different strategies will have different parameters but please note that in general for a ForexTester strategy there will be a Currency Pair and a time-frame input. In order for your strategy to work you MUST ensure that both these inputs match the chart that you are working with otherwise the strategy will not work. Click the Apply button at the end to save your chosen input values and close the dialog box.

7. Back in the Strategies list dialog box, tick the box at the left-hand end of the line that lists your strategy to say that you want to activate your strategy. Please also ensure that the Enable strategies execution box is ticked at the bottom.

Your chosen strategy after activation

8. Your strategy should now be activated and will start working as you play through your data. Please note that you can turn all strategies on and off using the Testing | Enable/disable Strategy Execution menu option or alternatively by using the toobar button. If you want to reset your strategy at anytime then go back to the Strategies List and remove and then re-apply the tick on the left-hand side. This will reset the strategy back to its initial state.

 

The Strategy Enable/disable toolbar button

 

Troubleshooting

If you have any problems with any part of this installation then one useful tip is to look at the Journal tab of ForexTester where helpful information is printed out. There you should see any error messages appear when ForexTester tries to load up the dll.

Installing & Using Script DLL’s in ForexTester

A ForexTester script will be supplied to you as one or two Windows DLL libraries, so files with a .dll suffix.

To Install

1. Shut down your copy of ForexTester

2. Find the folder where ForexTester is installed. This is usually something like
C:ForexTester3
(or C:ForexTester2 if you’re running the older version)

3. Find the Scripts sub-folder (so C:ForexTester3Scripts for example) and copy the two dll files there.

4. Re-start ForexTester and find the Scripts panel. This is usually on a tab next to the Data Window but if you can’t find it then go to the View | Show Panels | Scripts menu option, making sure that there’s a tick next to it. You should see your script or scripts listed there though you won’t initially see anything in the Hotkey section

The Scripts panel

5. Right click on one of the scripts and select Edit Script Properties. This will bring up the script properties dialog box. Here you can set all the inputs for your script. The first entry in this list will be the Hot key value. Please note that you must set this value to a unique key combination that is not being used by any other script, otherwise it will complain. Please also note that in general for a ForexTester script there will be a Currency Pair and a time-frame input. In order for your script to work you MUST ensure that both these inputs match the chart that you are working with otherwise the script will not work.

A typical script input selection

6. You can set the other inputs as required for your particular script.

Troubleshooting

If you have any problems with any part of this installation then one useful tip is to look at the Journal tab of ForexTester where helpful information is printed out. There you should see any error messages appear when ForexTester tries to load up the dll.

 

To Use

When you want to apply the scrip to your chart you can either simply double-click on the script name in the Scripts panel or you can use the unique key combination. This will immediately run the script. Please note that a script is specifically designed to be a “run once” operation. To get it to run again you need to double-click again (or use the key combination again).

Metatrader 101: Installing a DLL Library to your Mt4 Installation

This is the one in a series of Metatrader 101 posts, partly so that I can have something to give to clients who are new to Mt4. It will cover the basics so people can get up and running quickly.

 

Some more advanced Metatrader code that you’ll come across will require a DLL (a Windows library file) to be installed as well as the actual .ex4 or .mq4 file. This is actually just as easy as installing any Metatrader code. Here’s how to do it.

 

1. A DLL file will have a .dll name tag to it so you’ll know that it needs to be treated differently from other Metatrader files.

 

2. Unfortunately, the location on your hard drive of your Mt4 software is rather complicated as it’s split up into two locations. The bit where you need to copy your new software to is hidden away deep within the AppData section and you won’t easily find it by exploring the various folders. To help you with this there is a menu option which will open the location for you. From your Mt4 software go to File | Open Data Folder in order to bring up Windows Explorer opened at the correct folder location.

 

The folders within the MQL4 main folder

 

3.  You’ll see an MQL4 folder which you should open to reveal a series of sub-folders (see image above). Unlike for .mq4 or .ex4 files, DLL’s need to go in the Libraries folder so navigate there and drop the file in the folder.

 

4. That’s basically it! Unlike for .mq4 or .ex4 files there’s no need to refresh or restart your Mt4 program explicitly for the DLL though if you’ve installed some code which uses the DLL then you’ll need to refresh or restart for that part. See the instruction on installing new Mt4 code for details on how to install mq4 or .ex4 files.