forex software

Create and Test Forex Strategies

forex software

express-generator:gen-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:gen-js [2026/02/22 07:56] – [Generate new strategies] Miroslav Popovexpress-generator:gen-js [2026/05/29 10:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Generator (gen.js) ====== ====== Generator (gen.js) ======
  
-The Generator scrip **gen.js** serves to; +The Generator script **gen.js** serves to: 
-  * generate new collections for given data and parameters +  * generate new strategy collections for selected data and settings 
-  * re-calculate previously generated collections against new data or new parameters +  * re-calculate previously generated collections against updated data or updated parameters 
-  * validate collections against Acceptance Criteria or Monte Carlo +  * validate collections against Acceptance Criteria and Monte Carlo settings 
-  * optimize collections+  * optimize strategies with the built-in optimizer 
 + 
 +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|Quick Start]] and use this page as the detailed reference. 
 + 
 +===== Main workflows ===== 
 + 
 +  * New generation from market data 
 +  * Validation of existing collections 
 +  * Validation, then generation (combined run) 
 +  * Generation with optimizer and Monte Carlo validation 
 + 
 +Recommended sequence for new users: 
 + 
 +  * fetch or refresh data with [[fetch-js|Fetcher (fetch.js)]] 
 +  * run generation for one market and period 
 +  * validate existing collections after data refresh
  
 ===== Quick start ===== ===== Quick start =====
Line 16: Line 37:
     express-generator> node ./bin/gen.js --server MetaQuotes --symbol EURUSD --period M15     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: Output:
 +<code txt>
 +                        ..:: 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
 +</code>
 +
 +===== Settings topics =====
 +
 +See the dedicated pages for each ''gen.settings.ini'' section:
  
-                            ..:: Express Generator v2.70 ::.. +  * [[data-source|Data source]] 
-     +  * [[output-collection|Output collection]] 
-     +  * [[input-collection|Input collection]] 
-        Market : MetaQuotes EURUSD M15 +  * [[collection|Collection]] 
-        From   : 2022-02-11 13:00, To: 2026-02-20 21:30, Bars: 100000 +  * [[generator-stop|Generator stop]] 
-        Spread : 10, Swap long: -0.7, Swap short: -1, Commission: 6 USD +  * [[acceptance-criteria|Acceptance criteria]] 
-        Account: 10000 USD, Leverage: 100, Entry: 0.01 lots +  * [[account-settings|Account settings]] 
-     +  * [[strategy-properties|Strategy properties]] 
-     +  * [[backtester|Backtester]] 
-        10459 ┤                                 ╭──╮       Net profit      410.54 USD +  * [[data-horizon|Data horizon]] 
-        10417 ┤                                ╭╯  ╰──     Profit per day  0.28   USD +  * [[forward-testing|Forward testing]] 
-        10375 ┤                              ╭─╯           Profit factor   1.73    +  * [[out-of-sample|Out of sample]] 
-        10333 ┤                            ╭─╯             Max drawdown    73.29  USD +  * [[trading-session|Trading session]] 
-        10290 ┤                         ╭──╯               Max drawdown    0.73   % +  * [[symbol-info|Symbol info overrides]] 
-        10248 ┤                ╭╮ ╭─────╯                  Return/drawdown 5.60    +  * [[miscellaneous|Miscellaneous]] 
-        10206 ┤              ╭─╯╰─╯                        Win / loss      0.61    +  * [[indicators|Indicators]] 
-        10164 ┤          ╭───╯                             Max stagnation  256    days +  * [[indicators-options|Indicator options]] 
-        10122 ┤     ╭────╯                                 Max stagnation  17.41  % +  * [[auto-save|Auto-save]] 
-        10080 ┤     │                                      R squared     87.03   +  * [[optimizer|Optimizer]] 
-        10037 ┤    ╭╯                                      Max cons losses 4       +  * [[monte-carlo|Monte Carlo]] 
-         9995 ┼╮╭──╯                                       Count of trades 171     +  * [[settings-files|Settings files]]
-         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+