Hi there,
I'm following along with your videos on how to use the ApiDataProvider and have hit a snag. I clearly see the data in MyData - 2015/01/01-2016/01/01 for EURUSD and Forex/FXCM minute data. Just like in the video.
public class BasicTemplateAlgorithm : QCAlgorithm
{
private Symbol _eurusd = QuantConnect.Symbol.Create("EURUSD", SecurityType.Forex, Market.FXCM);
/// <summary>
/// Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
/// </summary>
public override void Initialize()
{
SetStartDate(2015, 1, 7); //Set Start Date
SetEndDate(2016, 1, 1); //Set End Date
SetCash(100000); //Set Strategy Cash
// Find more symbols here: http://quantconnect.com/data
// Forex, CFD, Equities Resolutions: Tick, Second, Minute, Hour, Daily.
// Futures Resolution: Tick, Second, Minute
// Options Resolution: Minute Only.
AddEquity("EURUSD", Resolution.Minute);
// There are other assets with similar methods. See "Selecting Options" etc for more details.
// AddFuture, AddForex, AddCfd, AddOption
}
/// <summary>
/// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
/// </summary>
/// <param name="data">Slice object keyed by symbol containing the stock data</param>
public override void OnData(Slice data)
{
if (!Portfolio.Invested)
{
SetHoldings(_eurusd, 1);
Debug("Purchased Stock");
}
}
}
My ApiDataProvider is correctly trying to fetch the data, but it keeps coming up with the error - Unable to remotely retrieve data for path ../../../Data/equity\usa\minute\eurusd\20151231_trade.zip. Please make sure you have the necessary data in your online QuantConnect data library.
The only thing I can see that looks wrong to me is _trade and not _quote. The MyData library seems to show the zip file named as _quote. I can't find where to edit this in the code. I found one area for fileDestination in the QuantConnect.ToolBox.QuantQuoteConverter,
var fileDestination = string.Format("{0}/equity/{1}/{2}/{3}_trade.zip", destinationDirectory, resolution, symbol, date.ToString("yyyyMMdd"));
but editing that didn't have the desired effect (so I reverted it).
Any ideas what I can do?
Kevin Hughes
Any luck? I'm running into the same issue.
Jared Broad
Hi Kevin Hughes // Angelo P
That is strange it should normally resolve the right path to quote for FX files. Did you make any changes to your LEAN installation?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Angelo P
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!