QuantConnect / Lean

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
https://lean.io
Apache License 2.0
9.43k stars 3.2k forks source link

Backtest data from Fxcm #529

Closed benjaminthedonkey closed 8 years ago

benjaminthedonkey commented 8 years ago

In backtest mode the system looks for historical data into ..Data/Forex/Fxcm/ folder. How I change it to use another broker?. Thanks.

jaredbroad commented 8 years ago

We break data into markets; e.g. you can have AAPL stock in the Mexican and the US exchanges as two separate tradable contracts. This is even more apparent with FX brokerages who often are market makers themselves and have their own contract pricing.

This is controlled in the Market.X enum; you specify which market you'd like when you AddForex("EURUSD", Resolution.Minute, Market.Oanda / Market.Fxcm); You could add your own brokerage and add an entry to the market enum here.

If you add a new brokerage implementation please submit it as a PR!

PS: We provide all the FXCM and Oanda data for download via our data library on quantconnect.com/data.