forex software

Create and Test Forex Strategies

forex software

express-generator:mm-js

This is an old revision of the document!


Multi-Market (mm.js)

The Multi-Market script (mm.js) validates a collection against another markets.

Quick start

Validate a collection against 8 markets and export the strategies that pass 5 of 8 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

Output fetch:

      ..:: Express Generator Multi Market v2.70 ::..
  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 Files

The Multi-Market script ./bin/mm.js uses a default settings file ./bin/mm.settings.ini. You can use it as a reference of all the available parameters.

mm.js always loads the default settings file. Then we specify the parameters with custom settings files or CLI parameter.

Here we load custom settings file mm.in and then override some of the parameters:

  node ./bin/mm.js --settings mm.ini --symbol GBPUSD

We can give several settings files. The later overrides the previous one.

  node ./bin/mm.js --settings mm.ini gbpusd.ini

Parameters

The Multi-Market needs several groups of parameters:

  • Initial data set - it is necessary to resolve the input template placeholders when loading the initial collection.
    • Parameters: –server, –symbol, –period