====== Settings Files ====== Express Generator uses settings files in ''ini'' format. You can run ExGen with: * default settings files only * one custom settings file * several custom settings files layered in order * CLI overrides on top of settings files ===== Default settings files ===== Each script has a default settings file in ''./bin'': * Fetcher: ''./bin/fetch.settings.ini'' * Generator: ''./bin/gen.settings.ini'' * Multi-Market: ''./bin/mm.settings.ini'' If you do not pass ''--settings'', the script uses only its default file. ===== INI format basics ===== An INI file is plain text with ''key = value'' lines. * Lines starting with '';'' are comments. * Use one setting per line. * For multi-value options, separate values with spaces. * The order of parameters inside one INI file is not important. Example ''gen.ini'': ; Market symbol = EURUSD period = H1 ; Minimal Profit Factor min_profit_factor = 1.4 Example with multiple values: symbols = EURUSD GBPUSD USDJPY periods = M15 M30 H1 ===== Use one custom settings file ===== You can provide one user file with ''--settings''. node ./bin/gen.js --settings my-gen.ini This loads: * default ''gen.settings.ini'' * then ''my-gen.ini'' (overrides defaults where keys overlap) ===== Use several custom settings files ===== You can pass several files after ''--settings''. node ./bin/gen.js --settings gen.ini EURUSD.ini This is useful when you keep: * one common base file (for example ''gen.ini'') * one market-specific file (for example ''EURUSD.ini'') File names are for your convenience. The important part is the order. ===== Priority and override order ===== Settings are merged in this order (lowest to highest priority): * default script settings file * first custom settings file from ''--settings'' * second custom settings file from ''--settings'' * next custom settings files (left to right) * CLI options (highest priority) When there are several custom files, each next file overrides keys from the previous one. CLI options always win. Important order rules: * The order of CLI options in the command is not important. * The order of parameters inside each INI file is not important. * The order of files passed to ''--settings'' is important. ===== Practical example ===== Command: node ./bin/gen.js --symbol EURUSD --settings gen.ini EURUSD.ini --period M30 How values are resolved: * ''gen.settings.ini'' provides defaults * ''gen.ini'' overrides some defaults * ''EURUSD.ini'' overrides ''gen.ini'' * ''--symbol EURUSD'' and ''--period M30'' override everything above ===== Tips ===== * Keep reusable defaults in one base file and strategy or symbol specifics in separate files. * You can omit ''.ini'' extension in ''--settings'' values; it is added automatically when missing. * Use ''--settings'' for stable presets and CLI options for run-specific changes. ===== Related pages ===== * [[quick-start|Quick Start]] * [[fetch-js|Fetcher (fetch.js)]] * [[gen-js|Generator (gen.js)]] * [[mm-js|Multi-Market (mm.js)]]