Node.js-based framework for backtesting Forex trading strategies. See "cuda" branch for C++/CUDA version.
Branch: master
Clone or download
Latest commit 9f1b62b Mar 31, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig Initial commit. Aug 10, 2015
.node-version Updated README. Mar 31, 2016 Restored things to a normal state. Nov 29, 2015
db.js Made the database name configurable, and split the "Reversals" optimi… Oct 12, 2015


Small Node.js-based framework for backtesting Forex trading strategies. Allows creation of strategies and studies, and makes inclusion of studies within strategies easy.


  1. Install Node.js:
  2. Install Gulp globally: npm install -g gulp.
  3. Install Node modules: npm install.
  4. Download minute tick data for one security from a supported data provider.
    1. MetaTrader link:
  5. Open MetaTrader, and open the History Center. Then import the data and export it into CSV format.
  6. Put the data into ./data/:
    1. mkdir ./data/metatrader
    2. mv AUDJPY.csv ./data/metatrader
  7. Create database forex-backtesting with indexes:
db.positions.createIndex({symbol: 1});
db.positions.createIndex({strategyUuid: 1});
db.backtests.createIndex({symbol: 1});
db.datapoints.createIndex({symbol: 1});
db.datapoints.createIndex({"data.timestamp": 1});
db.datapoints.createIndex({"data.groups.testing": 1});
db.datapoints.createIndex({"data.groups.validation": 1});
db.forwardtests.createIndex({symbol: 1});
db.forwardtests.createIndex({group: 1});
db.validations.createIndex({symbol: 1});
db.validations.createIndex({winRate: 1});
db.validations.createIndex({symbol: 1, configuration: 1});

Now run ./ AUDJPY.