Fetch Settings
The Fetch Settings configuration is used to prepare and download historical data, as well as related information such as FX rates and symbol metadata. This data is crucial for generating and validating trading strategies. The settings are defined in an INI file that can be used with the fetch
command.
General Usage
To use the fetch
command, you can provide a settings file and optionally specify parameters via command line options. Example command:
node ./bin/fetch.js --settings my-fetch.ini --time-zone-offset -4 --symbol AUDUSD USDCAD
Fetch Settings Configuration
FX Rates
- fx_rates: Determines whether to download FX rates.
- Type: Boolean
- Default:
false
- Description: If
true
,fx-rates.json
will be downloaded, containing the latest FX rates. FX rates are subject to change, so they should be updated periodically if needed.
Symbol Info
- symbol_info: Determines whether to download symbol information.
- Type: Boolean
- Default:
false
- Description: If
true
,symbol-info.json
will be downloaded. This file contains meta-information about the historical data. Symbol info rarely changes, so it is generally safe to leave this set tofalse
.
Server
- server: Specifies the server from which to download data.
- Type: String
- Default:
Premium
- Values: Premium, Eightcap, BlackBull, Darwinex, MetaQuotes
- Description: Choose the data provider from which to fetch historical data.
Symbols
- symbol: Lists one or several symbols to download.
- Type: String (space-separated list)
- Default: (empty)
- Example:
EURUSD USDCHF GBPUSD USDJPY
- Description: Define which currency pairs or symbols to download historical data for.
Periods
- period: Defines the time intervals for the historical data.
- Type: String
- Default:
M30
- Values: M1, M5, M15, M30, H1, H4, D1
- Description: Specify the time period for the data, such as 1 minute (M1) or 30 minutes (M30).
Time Zone Offset
- time_zone: Sets the time zone offset in hours relative to UTC.
- Type: Integer
- Default:
0
- Description: Adjust the time zone to match the local time zone of the data. For UTC, the value is
0
.
Maximum Data Bars
- max_data_bars: Limits the number of historical data bars to download.
- Type: Integer
- Default:
0
- Description: Set this value to limit the number of bars downloaded.
0
means no limit, and all available data will be fetched.
Update Express Generator
- check_for_update: Determines whether to check for updates to Express Generator.
- Type: Boolean
- Default:
true
- Description: If
true
, the system will check for updates.
- automatic_update: Determines whether to automatically update Express Generator.
- Type: Boolean
- Default:
true
- Description: If
true
, updates will be applied automatically.
- update_check_interval: Defines how frequently to check for updates.
- Type: Integer
- Default:
24
- Description: Interval in hours to check for updates. The default is every 24 hours.
Console Output
- silent: Controls whether to suppress console output.
- Type: Boolean
- Default:
false
- Description: If
true
, only errors will be shown in the console; other output will be suppressed.
Example Configuration
Here is an example of a fetch settings file:
; Fetch settings example
fx_rates = true
symbol_info = true
server = Premium
symbol = EURUSD GBPUSD
period = H1
time_zone = -5
max_data_bars = 10000
check_for_update = true
automatic_update = true
update_check_interval = 24
silent = false
In this example, FX rates and symbol info are set to be downloaded, data will be fetched from the Premium
server for the symbols EURUSD
and GBPUSD
with a period of H1
. The time zone offset is set to -5 hours, and a maximum of 10,000 bars will be downloaded. Updates are checked every 24 hours, and output will be shown in the console.