Skip to main content
Version: 2.0

OUF - Output Folder

Concept diagram

The concept diagram provided below depicts the function block associated with this page.

Concept diagram, Output Folder.png

Execute a build-in example

The Expert Advisor Builder comes with a variety of examples that are readily accessible from the inputs menu. Each example is accompanied by a dedicated article within this documentation for further reference. These examples encompass a broad spectrum of the Expert Advisor Builder's capabilities and can act as a foundation for your professional trading system development. Please refer to the > (OUF) Example selection input parameter to execute any examples.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (OUF) Example selection
(IN_nOufExampleSelection)
OFF (New Idea)Numeric values usable in SET files:
0 - OFF (New Idea)
1 - No.1: MACD - Long trading
2 - No.2: MACD - Short trading
3 - No.3: MACD - Long signal only
4 - No.4: MACD - Short signal only
5 - No.5: Multiple open trades allowed
6 - No.6: Fix pips distance as initial stop loss
7 - No.7: Resistance as initial stop loss
8 - No.8: Support as initial take profit
9 - No.9: Average true range (ATR) stop loss trailing
10 - No.10: Breakeven-ATR stop loss trailing
11 - No.11: Breakeven-ATR-Market combined stop loss trailing
12 - No.12: Pending order - Buy stop
13 - No.13: Pending order - Buy limit
14 - No.14: Pending order - Sell limit
15 - No.15: Pending order - Sell stop
16 - No.16: Pending order with price depended cancellation
17 - No.17: Trade splitting with two trades
18 - No.18: Trade splitting with three trades
19 - No.19: Temporary disabling of trading when bad performance
20 - No.20: Temporary disabling of trading when bad drawdown
21 - No.21: Permanent disabling of trading when bad performance
22 - No.22: Permanent disabling of trading when bad drawdown
23 - No.23: Trading signals at specific hours
24 - No.24: Trading signals at specific days of week
25 - No.25: Trading signals at specific days of month
26 - No.26: Intraday trading mode with forced closures at end of day
27 - No.27: Drawing of second timeframe in chart
28 - No.28: News trading of high impact calendar events
29 - No.29: News trading of regional high impact calendar events
30 - No.30: Avoiding of high impact calendar events
31 - No.31: Indicators - One indicator line used
32 - No.32: Indicators - Two indicator lines combined
33 - No.33: Indicators - Four indicator lines combined
34 - No.34: Indicators - Using of open price series as indicator
35 - No.35: Indicators - Bollinger bands example
36 - No.36: Oscillators - One oscillator line used as signal
37 - No.37: Oscillators - Two oscillator lines combined as signal
38 - No.38: Oscillators - Using of volume as oscillator (every tick)
39 - No.39: Oscillators - Four oscillator lines combined
40 - No.40: Trading based on candle pattern signals
41 - No.41: Trading with one chart analyzer
42 - No.42: Detecting of market underestimations

When an example is chosen, all other input parameters are disregarded. Therefore, if your configured trading strategy is not reflected in a strategy test, please double-check the example selector input parameter.

Output folder for single runs

Upon completion of each run, the Expert Advisor Builder generates a SET file. This file encompasses all the input parameters that delineate the comprehensive trading module. The parameter > (OUF) Idea output description (max 63 characters) can be utilized to name the trading module. This description will be displayed when you run the trading module using the Custom Expert Advisor and monitor it with the inspector dashboard feature.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (OUF) Idea output description (max 63 characters)
(IN_strOufIdeaOutputDescription)
No idea description!The input value cannot be empty, longer than 63 characters or contain = or IN_.
> (OUF) Idea output folder (0 -> auto new, >0 -> manually)
(IN_nOufIdeaOutputFolder)
1The input value cannot be smaller than 0.
Must be unequal to 0 for optimization test runs.

As you may already know, the Expert Advisor Builder saves its output in a designated tester folder. This folder can be conveniently accessed through the Windows start menu or via a shortcut set up on your Windows desktop. Both options are illustrated below.

Configuration, Output Folder, Application folder on desktop and start menu.png

Alternatively, you can access the completed output folder folder by entering the designated path into your Windows folder browser.

%AppData%\MetaQuotes\Terminal\Common\Files\FEA Trading Tester Data\Expert Advisor Builder 2.0\Completed

The folder Completed houses two subfolders. The folder Optimization is designated for storing all test results and SET files when the Expert Advisor Builder is operated in the optimization mode of the MetaTrader strategy tester. On the other hand, the folder Single is utilized for standard test runs. The entire directory tree, commencing with the live folder, is illustrated below.

Configuration, Output Folder, Folder path and data organization.png

This division was implemented to minimize the storage needed when conducting optimization tests. Regardless, in both scenarios, you'll notice that each trading module employs a folder, typically commencing with EAM_I followed by an integer number. The parameter > (OUF) Idea output folder (0 -> auto new, >0 -> manually) allows you to select the integer number which is appended. You can specify a particular number or enable the application to increment this folder after each test run. For the auto-incremental option, set this value to zero. The Expert Advisor Builder will automatically version each tested trading idea within the folder selected with this parameter. Please refer to the relevant article for more information on how the versioning works.

The recommended approach is to assign a fixed number (e.g., 10001) to the > (OUF) Idea output folder (0 -> auto new, >0 -> manually) and develop the entire trading module within that output folder. As versioning occurs automatically, there's no need to increment the idea output folder. However, the option remains available if needed.

Please note that when conducting optimization tests, the parameter > (OUF) Idea output folder (0 -> auto new, >0 -> manually) cannot be set to 0. The Expert Advisor Builder will not execute trades if zero is entered as an input parameter and an optimization test run is performed.

Output folder for optimization runs

MetaTrader may conduct hundreds of individual test runs during an optimization test run, each differing only slightly from the others. As a result, when the Expert Advisor Builder is executed in optimization mode, it only outputs a table in the form of a text file with the test results and the SET file containing the trading module configuration. This implies that features like journal generation or statistics are unavailable in optimization mode. The actual output folder is also determined by a numeric input parameter used to name the output folders accordingly.

If > (OUF) Optimization run output folder (0 -> OFF) is set to zero, neither the table nor the SET file will be generated. If it is not zero, a subfolder named EAM_In will be created in the Optimization folder, where n is defined by > (OUF) Optimization run output folder (0 -> OFF). Each subfolder also includes versioning to track changes.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (OUF) Optimization run output description (max 63 characters)
(IN_strOufOptimizationRunOutputDescription)
No optimization run description!The input value cannot be empty, longer than 63 characters or contain = or IN_.
> (OUF) Optimization run output folder (0 -> OFF)
(IN_nOufOptimizationRunOutputFolder)
0The input value cannot be smaller than 0.
Input IN_nOufIdeaOutputFolder must be unequal to 0 for optimization test runs.

The input parameter > (OUF) Optimization run output description (max 63 characters) can be used to describe the optimization run. Apart from aiding your understanding, this value has no further relevance. The exported SET file will include this description line during each optimization test run.