Page 1 of 1

DataLoader to load symbols not on chart

Posted: Jan 14 2023
by uprz23
Hi,

Is it possible to load data from a symbol that's not on the chart?

I get an error like "(SPY-1 Day): Symbol not found" when I have IBM on the chart. But when I change the instrument on the chart to SPY, it works.

Thanks

Code: Select all

protected override void StartCalc() { // assign inputs InstrumentDataRequest Request = Bars.Request; Request.Subscribe2RT = false; DataRequest _DataRequest = new DataRequest(); _DataRequest.RequestType = DataRequestType.FromTo; _DataRequest.From = new DateTime(2020,1,1,0,0,0); _DataRequest.To = new DateTime(2023,1,1,0,0,0); Request.Range = _DataRequest; Request.QuoteField = RequestQuoteField.Trade; Request.Symbol = "IBM"; Request.DataFeed = "TS"; DataLoader.BeginLoadData(Request, OnData, null); }

Re: DataLoader to load symbols not on chart

Posted: Jan 18 2023
by Polly MultiCharts
Hello uprz23,

If you’re referring to the TS data feed, the request should contain the full name of it.
Also please note that exchanges can be different, so you need to specify that in the request as well.
You can try these code samples:

Code: Select all

Request.Symbol = "IBM"; Request.Exchange = "NYSE"; Request.DataFeed = "TS";
or

Code: Select all

Request.Symbol = "SPY"; Request.Exchange = "ARCX"; Request.DataFeed = "TS";