Create and Test Forex Strategies
This page explains how to download historical data with fetch.js.
node ./bin/fetch.js --server Premium --symbol EURUSD --period M30
node ./bin/fetch.js --server Premium --symbols EURUSD GBPUSD --periods M15 M30 H1
Allowed server values:
Allowed period values:
Use time_zone (or –time-zone) to set hour offset relative to UTC.
Fetcher applies this value as a timestamp shift before saving the downloaded dataset.
node ./bin/fetch.js --symbol EURUSD --period H1 --time-zone -4
Use max_data_bars (or –max-data-bars) to cut downloaded history.
node ./bin/fetch.js --symbol EURUSD --period M15 --max-data-bars 100000
Set to 0 to keep all available bars.
Use if_missing_or_older_than to avoid frequent downloads.
This rule applies to historical data files only.
node ./bin/fetch.js --symbols EURUSD GBPUSD --period M15 --if-missing-or-older-than 60
Meaning:
Use silent mode for background scripts:
node ./bin/fetch.js --symbol EURUSD --period M30 --silent true
Errors are still printed.
server = Premium symbol = EURUSD GBPUSD period = M15 M30 time_zone = 0 max_data_bars = 0 if_missing_or_older_than = 60 silent = false
./res/<server>.json).