Table of Contents

Generator (gen.js)

The Generator script gen.js serves to:

Generator settings are defined in ./bin/gen.settings.ini and can be overridden by user settings files and command options.

You can pass one or several user settings files with –settings. When several files are provided, each next file overrides values from the previous one. CLI options have highest priority.

If you are new to ExGen workflows, start with Quick Start and use this page as the detailed reference.

Main workflows

Recommended sequence for new users:

Quick start

Generate new strategies

Command:

  express-generator> node ./bin/gen.js --server MetaQuotes --symbol EURUSD --period M15

Validate an existing collection

Command:

  express-generator> node ./bin/gen.js --input ./collections/Coll_MetaQuotes_EURUSD_M15.json --server MetaQuotes --symbol EURUSD --period M15

Validate, then continue generating

Command:

  express-generator> node ./bin/gen.js --input ./collections/MetaQuotes --input-match EURUSD M15 --validate-then-generate true

Output review (example)

The following sample output can be used as a visual review of a successful generation run.

Output:

                        ..:: Express Generator v2.xx ::..
 
 
    Market : MetaQuotes EURUSD M15
    From   : 2022-02-11 13:00, To: 2026-02-20 21:30, Bars: 100000
    Spread : 10, Swap long: -0.7, Swap short: -1, Commission: 6 USD
    Account: 10000 USD, Leverage: 100, Entry: 0.01 lots
 
    10459 ┤                                 ╭──╮       Net profit      410.54 USD
    10417 ┤                                ╭╯  ╰──     Profit per day  0.28   USD
    10375 ┤                              ╭─╯           Profit factor   1.73
    10333 ┤                            ╭─╯             Max drawdown    73.29  USD
    10290 ┤                         ╭──╯               Max drawdown    0.73   %
    10248 ┤                ╭╮ ╭─────╯                  Return/drawdown 5.60
    10206 ┤              ╭─╯╰─╯                        Win / loss      0.61
    10164 ┤          ╭───╯                             Max stagnation  256    days
    10122 ┤     ╭────╯                                 Max stagnation  17.41  %
    10080 ┤     │                                      R - squared     87.03
    10037 ┤    ╭╯                                      Max cons losses 4
     9995 ┼╮╭──╯                                       Count of trades 171
     9953 ┤╰╯                                          Avrg pos length 579    bars
 
 
  - Ascended: 400, Calculated: 17949, Time: 03:00 of 03:00, Coll: 100
 
Generator Ready!
Count of strategies: 100
Collection exported: collections/Coll_MetaQuotes_EURUSD_M15.json

Settings topics

See the dedicated pages for each gen.settings.ini section: