forex software

Create and Test Forex Strategies

forex software

express-generator:mm-js

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
express-generator:mm-js [2026/02/22 08:07] Miroslav Popovexpress-generator:mm-js [2026/05/29 10:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Multi-Market (mm.js) ====== ====== Multi-Market (mm.js) ======
  
-The Multi-Market script (mm.js) validates a collection against another markets.+The Multi-Market script **mm.js** revalidates a collection of strategies across multiple markets. 
 +It combines two core capabilities:
  
-==== Quick start ====+  * data fetching from the Fetcher workflow 
 +  * strategy validation from the Generator validator workflow
  
-Validate a collection against 8 markets and export the strategies that pass 5 of 8 tests.+If you are new to ExGen workflows, begin with [[quick-start|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: 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     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: Output fetch:
  
-        ..:: Express Generator Multi Market v2.70 ::..+<code text> 
 +..:: 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 EURUSD M30, From: 2018-02-13 20:30, To: 2026-02-20 22:00, Bars: 100000
Line 24: Line 54:
     Fetched: Premium Data EURCHF M30, From: 2018-02-13 07:30, 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     Fetched: Premium Data EURJPY M30, From: 2018-02-13 14:30, To: 2026-02-20 22:00, Bars: 100000
 +</code>
  
 Output validation: Output validation:
  
 +<code text>
     ...     ...
     Market : Premium Data NZDUSD M30     Market : Premium Data NZDUSD M30
Line 32: Line 64:
     Spread : 10, Swap long: -4.16, Swap short: -4.16, Commission: 6 USD     Spread : 10, Swap long: -4.16, Swap short: -4.16, Commission: 6 USD
     Account: 10000 USD, Leverage: 100, Entry: 0.01 lots     Account: 10000 USD, Leverage: 100, Entry: 0.01 lots
-     + 
-     - Passed: 12, Calculated: 100 of 100  +     - Passed: 12, Calculated: 100 of 100 
-    +
     Market : Premium Data EURGBP M30     Market : Premium Data EURGBP M30
     From   : 2018-02-13 17:00, To: 2026-02-20 22:00, Bars: 100000     From   : 2018-02-13 17:00, To: 2026-02-20 22:00, Bars: 100000
Line 40: Line 72:
     Account: 10000 USD, Leverage: 100, Entry: 0.01 lots     Account: 10000 USD, Leverage: 100, Entry: 0.01 lots
     ...     ...
 +</code>
  
 Output stats and collection: Output stats and collection:
  
-    Multi-Market validator ready!+<code text> 
 +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 
 +</code> 
 + 
 +===== 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 ===== 
 + 
 +Dedicated Multi-Market pages: 
 + 
 +  * [[mm-initial-data|Initial data set]] 
 +  * [[mm-fetch-parameters|Fetch parameters]] 
 +  * [[mm-test-markets|Test markets]] 
 +  * [[mm-tests|Multi-Market tests]] 
 + 
 +Shared settings pages used by Multi-Market: 
 + 
 +  * [[input-collection|Input collection]] 
 +  * [[output-collection|Output collection]] 
 +  * [[data-horizon|Data horizon]] 
 +  * [[out-of-sample|Out of sample]] 
 +  * [[trading-session|Trading session]] 
 +  * [[account-settings|Account settings]] 
 +  * [[backtester|Backtester]] 
 +  * [[acceptance-criteria|Acceptance criteria]] 
 +  * [[miscellaneous|Miscellaneous]] 
 +  * [[settings-files|Settings files]] 
 + 
 + 
 +===== Related scripts ===== 
 + 
 +  * [[fetch-js|Fetcher (fetch.js)]] 
 +  * [[gen-js|Generator (gen.js)]]
  
-    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