forex software

Create and Test Forex Strategies

forex software

express-generator

Express Generator

Goals

* Using static resources * A predefined strategy structure

Install or update Express Generator

Express Generator requires Node.js.

Please install the latest version of Node.js from its website: https://nodejs.org/en/

Download Premium Data and update the FX rates

Command: node ./bin/fetch - download historical data and FX rates.

Options:

  • —symbol EURUSD GBPUSD - download the given symbols from the Premium Data Feed.
  • —fx-rates - update the forex exchange rates

You can download historical data or FX rates, or both together.

Example:

node ./bin/fetch --symbol EURUSD GBPUSD --fx-rates

Generate a new Collection

Command: `node ./bin/gen`

Options:

* –settings ./my-settings.ini - specify settings to override the master settings. * –data ./data/premium/EURUSD_M30.json - specify a data file. * –input ./old-collection.json - input Collection. It is used when we want to recalculate an old Collection. * –output ./new-collection.json - specified output collection file. If it is not given, ExGen uses a generic name.

You can use options to override the settings. All settings parameters can be used as options also.

Examples:

Use default DataSet and Settings. The default data file is defined in ./system/settings.master.ini. Produce a Collection with a generic name.

node ./bin/gen

Specify the DataSet. Use default Settings: ./system/settings.master.ini. Produce a Collection with a generic name.

node ./bin/gen --data ./data/premium/EURUSD_M30.json

Specify the DataSet and Settings. Produce a Collection with a generic name.

node ./bin/gen --data ./data/premium/EURUSD_M30.json --settings ./my-settings.ini

Specify the DataSet, the Settings, and the output collection name.

node ./bin/gen --settings ./my-settings.ini              ^
               --data     ./data/premium/EURUSD_M30.json ^
               --output   ./new-collection.json

Recalculate a Collection

The parameters are the same as above, but we give an input collection.

node ./bin/gen --settings ./my-settings.ini              ^
               --data     ./data/premium/EURUSD_M30.json ^
               --input    ./old-collection.json          ^
               --output   ./new-collection.json

Recalculate multiple Collections

We calculate multiple collections in three ways:

- Give multiple collections to the –input option

node ./bin/gen --settings ./my-settings.ini ^
               --input    ./old-collection-1.json ./old-collection-2.json  ./old-collection-3.json ^
               --output   ./new-collection.json

- Use multiple `–input` options

node ./bin/gen --settings ./my-settings.ini       ^
               --input    ./old-collection-1.json ^
               --input    ./old-collection-2.json ^
               --input    ./old-collection-3.json ^
               --output   ./new-collection.json

- Give a collection folder to the –input option.

We can override each setting parameter from the settings files with an option. It is a good idea to remove the Generator limitations when recalculating strategies.

node ./bin/gen --settings ./my-settings.ini     ^
               --input    ./collection          ^
               --output   ./new-collection.json ^
               --max-calculated-strategies 0    ^
               --max-asceded-strategies    0    ^
               --max-working-minutes       0

Output Collection Pattern

We set the output collection path with the `–output` option or the `output` parameter in a settings file.

We can use either a static name as `./collection/ma-collection.json` or predefined placeholders, which will be set by the Generator.

Example: output = ./collections/Coll_[SERVER]_[SYMBOL][PERIOD]_[YEAR]-[MONTH]-[DAY]_str_[COUNT].json

It may produce a collection like this: Coll_Premium_Data_EURUSD30_2022-08-23_str_83.json.

Available placeholders:

[SERVER]  - Data source
[SYMBOL]  - Symbol
[PERIOD]  - Data period
[YEAR]    - The Year of the last data bar
[MONTH]   - The Month of the last data bar
[DAY]     - The Day of the month of the last data bar
[HOUR]    - The hour of the last data bar
[MINUTE]  - The Minute of the last data bar
[COUNT]   - Count of strategies.

Strategy Structure

* Open a position at Bar Open * Close a position at Bar Open for EA Studio or at Bar Close for FSB Pro * A strategy has 1-3 entry slots and 0-2 exit slots * The first entry slot has a “single” logic rule * The rest entry slots have “continues” logic rules * The exit slots have “continues” logic rules