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 09:20] Miroslav Popovexpress-generator:mm-js [2026/02/22 17:26] (current) – external edit 127.0.0.1
Line 32: Line 32:
     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 43: Line 43:
 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 +34 of 100 strategies passed  1 of 8 tests 
-    15 of 100 strategies passed  3 of 8 tests +43 of 100 strategies passed  2 of 8 tests 
-      3 of 100 strategies passed  4 of 8 tests +15 of 100 strategies passed  3 of 8 tests 
-      5 of 100 strategies passed  5 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+Count of strategies: 5 
 +Collection exported: collections/Coll_Premium_Data_EURUSD_M30_MM.json 
 +</code>
  
 ===== Settings Files ===== ===== Settings Files =====
Line 58: Line 60:
 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. 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** loads the default settings file first and then overrides the default parameters with the parameters given from a custom settings file or the CLI 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: Here we load custom settings file ''mm.in'' and then override some of the parameters:
Line 64: Line 66:
     node ./bin/mm.js --settings mm.ini --symbol GBPUSD     node ./bin/mm.js --settings mm.ini --symbol GBPUSD
  
-We can give several settings files. The later overrides the previous ones.+We can give several settings files. The later overrides the previous one.
  
     node ./bin/mm.js --settings mm.ini gbpusd.ini     node ./bin/mm.js --settings mm.ini gbpusd.ini
  
-   + 
 +===== Parameters ===== 
 + 
 +The Multi-Market needs several groups of parameters: 
 + 
 + 
 +==== Input Data set ==== 
 + 
 +<code ini> 
 +; These perameters serve to resoleve the input collection placeholders 
 + 
 +; Server: Premium, Eightcap, BlackBull, Darwinex, MetaQuotes 
 +server = Premium 
 + 
 +; The symbol of the original strategy 
 +symbol = EURUSD 
 + 
 +; Timeframe to download and use. 
 +; Available values: M1 M5 M15 M30 H1 H4 D1 
 +period = M30 
 + 
 +</code> 
 + 
 + 
 +==== Input collection  ==== 
 + 
 +<code ini> 
 +; Points to one or more collections, or to a collection directory, for validation. 
 +; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY] 
 +input = Coll_[SERVER]_[SYMBOL]_[PERIOD].json 
 + 
 +; Filters the input collections by given text phrases. 
 +; Useful when the "input" directory contains many collections. 
 +; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY] 
 +input_match = 
 +</code> 
 + 
 +==== Data parameters  ==== 
 + 
 +<code ini> 
 +; These parameters affect the initial data set and the fetched data 
 + 
 +; Time zone offset in hours. UTC = 0 
 +time_zone = 0 
 + 
 +; Cut data to maximum bars. 
 +; Set it to 0 to load all available bars 
 +max_data_bars = 100000 
 + 
 +; This option is helpful to prevent frequent downloads of data files. 
 +; It accepts time in *minutes*, where 0 means the option is off. 
 +; Example: if_missing_or_older_than = 60 
 +;   It downloads a new data file if the current file is missing or was not updated in the last 60 minutes. 
 +if_missing_or_older_than = 0 
 +</code> 
 + 
 +==== Test data ==== 
 + 
 +<code ini> 
 +; One or several servers to load and test 
 +; Valid server names: Premium, Eightcap, BlackBull, Darwinex, MetaQuotes 
 +test_servers = Premium 
 + 
 +; One or several periods to load and test 
 +; Valid period names: M1, M5, M15, M30, H1, H4, D1 
 +test_periods = M15 
 + 
 +; The symbols to download and use for the MM validation. 
 +; Example: test_symbols = EURUSD USDCHF GBPUSD USDJPY 
 +; Use "auto" to allow the program to select the symbols automatically. 
 +test_symbols = auto 
 +</code> 
 + 
 +==== Multi-Market tests ==== 
 + 
 +<code ini> 
 +; The count of the Multi Market tests to perform. 
 +count_of_tests = 5 
 + 
 +; The minimum count of the passed tests. 
 +; A test is considered as "passed" if it passed the Acceptance Criteria. 
 +; Must be less than or equal to "count_of_tests"
 +min_passed_tests = 3 
 +</code> 
 + 
 + 
 +==== Output collection ==== 
 + 
 +<code ini> 
 +; Output collection filename for a newly generated or validated collection. 
 +; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY], [COUNT], [PROFIT] 
 +; Placeholders can be used as directory names too. 
 +; Example: output = ./collections/[SERVER]/[SYMBOL]/[PERIOD]/collection.json 
 +output = Coll_[SERVER]_[SYMBOL]_[PERIOD]_MM.json 
 + 
 +; When "false", adds a suffix if the collection file already exists. 
 +; When "true", it overwrites the file. 
 +output_replace = false 
 +</code> 
 + 
 +==== Account settings ==== 
 + 
 +<code ini> 
 +account_currency = USD 
 +initial_account  = 10000 
 +leverage         = 100 
 +</code> 
 + 
 + 
 +==== Trading Session ==== 
 + 
 +<code ini> 
 +session_open  = 00:00 
 +session_close = 24:00 
 +friday_close  = 24:00 
 + 
 +trade_on_sunday = true 
 + 
 +close_at_session_close = false 
 +close_at_friday_close  = false 
 +</code> 
 + 
 + 
 +==== Backtester ==== 
 + 
 +<code ini> 
 +close_at_backtest_end = true 
 +</code> 
 + 
 + 
 +==== Acceptance criteria ==== 
 + 
 +<code ini> 
 +; Set 0 to ignore a criterion (except "min_profit"). 
 +max_average_pos_length = 0 
 +max_consecutive_losses = 0 
 +max_drawdown_percent   = 0 
 +max_equity_drawdown    = 0 
 +max_stagnation_days    = 0 
 +max_stagnation_percent = 0 
 +min_average_pos_length = 0 
 +min_count_of_trades    = 100 
 +min_profit             = 0 
 +min_profit_factor      = 0 
 +min_profit_per_day     = 0 
 +min_r_squared          = 0 
 +min_return_to_drawdown = 0 
 +min_win_loss_ratio     = 0 
 +min_m1_profit          = 0 
 +min_m1_profit_factor   = 0 
 +min_m1_count_of_trades = 0 
 +min_m3_profit          = 0 
 +min_m3_profit_factor   = 0 
 +min_m3_count_of_trades = 0 
 +min_y1_profit          = 0 
 +min_y1_profit_factor   = 0 
 +min_y1_count_of_trades = 0 
 +</code> 
 + 
 + 
 +==== Miscellaneous ==== 
 + 
 +<code ini> 
 +; Prevent showing output in the console (except errors) 
 +; This option is useful if you run mm.js from another script in the background. 
 +silent = false 
 +</code> 
 +