forex software

Create and Test Forex Strategies

forex software

express-generator:mm-js

Multi-Market (mm.js)

The Multi-Market script mm.js revalidates a collection of strategies across multiple markets. It combines two core capabilities:

  • data fetching from the Fetcher workflow
  • strategy validation from the Generator validator workflow

If you are new to ExGen workflows, begin with Quick Start before configuring Multi-Market runs.

How it works

Multi-Market runs this pipeline:

  • loads settings from ./bin/mm.settings.ini plus optional user settings and CLI overrides
  • resolves test markets from test_servers, test_periods, test_symbols, and count_of_tests
  • fetches required data files for each test market
  • validates each input strategy on each test market
  • counts passed tests per strategy and exports only those that meet min_passed_tests

Requirements

  • Input collection must be provided via input.
  • Symbol info files must exist for all test servers in ./res/<server>.json.
  • min_passed_tests must be less than or equal to count_of_tests.
  • Both count_of_tests and min_passed_tests must be 1 or greater.
  • You can prepare symbol info with Fetcher, for example: node ./bin/fetch.js –symbol-info true –server Premium.

Quick start

Validate a collection against 8 test markets and export strategies that pass at least 5 tests.

Command:

  express-generator> node ./bin/mm.js --server Premium --symbol EURUSD --period M30 --test-symbols auto --test-period M30 --test-server Premium --count-of-tests 8 --min-passed-tests 5

Run with a custom settings file and CLI override:

  express-generator> node ./bin/mm.js --settings mm.ini --symbol GBPUSD

Output fetch:

..:: Express Generator Multi Market v2.xx ::..
 
    Fetched: Premium Data EURUSD M30, From: 2018-02-13 20:30, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data GBPUSD M30, From: 2018-02-13 07:00, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data AUDUSD M30, From: 2018-02-13 17:00, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data NZDUSD M30, From: 2018-02-13 07:00, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data EURGBP M30, From: 2018-02-13 17:00, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data EURAUD M30, From: 2018-02-13 08:00, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data EURCHF M30, From: 2018-02-13 07:30, To: 2026-02-20 22:00, Bars: 100000
    Fetched: Premium Data EURJPY M30, From: 2018-02-13 14:30, To: 2026-02-20 22:00, Bars: 100000

Output validation:

    ...
    Market : Premium Data NZDUSD M30
    From   : 2018-02-13 07:00, To: 2026-02-20 22:00, Bars: 100000
    Spread : 10, Swap long: -4.16, Swap short: -4.16, Commission: 6 USD
    Account: 10000 USD, Leverage: 100, Entry: 0.01 lots
 
     - Passed: 12, Calculated: 100 of 100
 
    Market : Premium Data EURGBP M30
    From   : 2018-02-13 17:00, To: 2026-02-20 22:00, Bars: 100000
    Spread : 10, Swap long: -15.22, Swap short: 5.52, Commission: 6 USD
    Account: 10000 USD, Leverage: 100, Entry: 0.01 lots
    ...

Output stats and collection:

Multi-Market validator ready!
 
34 of 100 strategies passed  1 of 8 tests
43 of 100 strategies passed  2 of 8 tests
15 of 100 strategies passed  3 of 8 tests
 3 of 100 strategies passed  4 of 8 tests
 5 of 100 strategies passed  5 of 8 tests
 
Count of strategies: 5
Collection exported: collections/Coll_Premium_Data_EURUSD_M30_MM.json

Settings and priority

Multi-Market reads settings in this order (lowest to highest priority):

  • default settings file: ./bin/mm.settings.ini
  • user settings file(s): –settings my-mm.ini (or multiple files)
  • CLI options: for example –count-of-tests 8

Settings keys can be in snake case, camel case, or pascal case.

When several files are passed with –settings, each next file overrides keys from the previous one.

Common aliases are accepted:

  • settings and setting
  • test_servers and test_server
  • test_periods and test_period
  • test_symbols and test_symbol

Settings topics