Converts OHLC 1 minute data points (forex) to higher timeframes (e.g. 5 minutes)
Warning: This is a discarded idea and just a first hacked approach to solve the problem.
m1.js
reads 1m Forex data from a csv file (downloaded from http://www.histdata.com/download-free-forex-data/) using the node modulefast-csv
and stores it into a mysql DBm5.js
fetches the m1 data from the DB and usedconvertTimeframe.js
to convert the data to the m5 timeframe
Note:
- I noticed that the 1m data from histdata.com is sometimes missing data points. I coded a workaround so that null values will be inserted for that 1 minute data point.
convertTimeframe.js
will skip data sets with null values, instead the next entry/close will be taken to calculate the higher timeframe
$ git clone
$ npm install
- node/npm
- mysql
- fast-csv