With BacktestJS you can

Easily download candle data from binance and export to a csv.

leaf leaf leaf Docy banner shape 01 Docy banner shape 02 Man illustration Flower illustration
Historical Candle Data

Import Candle Data From CSV

Estimated reading: 2 minutes 163 views

Summary: Import any candle data to the app to then run strategies on

About

Although there is an option to download data from binance for crypto assets there is no automatic download available for traditional symbols such as apple or tesla stock as well as forex symbols such as usdyen.

This candle data can be downloaded from third party sites such as yahoo finance and can then be easily imported to the BacktestJS database to use with any strategy.


Preparing the CSV File

**** The csv file MUST have the following fields.
  • closeTime, CloseTime, closetime, Date or date
  • Open or open
  • High or high
  • Low or low
  • Close or close
*** The csv file can have the following OPTIONAL fields
  • openTime, OpenTime or opentime
  • Volume or volume
  • assetVolume, AssetVolume or assetvolume
  • numberOfTrades, NumberOfTrades or numberoftrades
Any additional fields will not cause an error but wont be added to the database


How to Import the CSV File

1. In the main menu choose Historical Candle Data

BacktestJS Home Historical Candle Data

2. Choose Import Candle Data From CSV

Historical Candle Data Import Candle Data From CSV

3. For base name write the stock name, for example apple stock base name is AAPL and tesla is TSLA, in forex an example for base is USD in the pair usdyen

4. For Quote name choose the asset (usually will be USD), in forex of usdyen the quote will be YEN

5. Use the dropdown to choose the CSV’s timeframe interval. You can narrow results by typing 1d or 4h, etc…

6. Put the path to where the csv file is saved (you can drag and drop the file into the program as well)

Historical Candle Data Import CSV

7. Upon clicking enter the program will validate the csv to make sure the mandatory fields are present and auto detect optional fields.

8. Choose Yes to Import CSV and save to DB to start the import process.

Historical Candle Data Import CSV Accept

*** Upon importing the csv, the application will automatically detect the start and end dates.

Leave a Comment

Share this Doc

Import Candle Data From CSV

Or copy link

CONTENTS