DataLoader to load symbols not on chart

Questions about MultiCharts .NET and user contributed studies.
uprz23
Posts: 12
Joined: Oct 27 2012
Has thanked: 2 times

Jan 14 2023

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); }

User avatar
Polly MultiCharts
Posts: 238
Joined: Jul 20 2022
Has thanked: 1 time
Been thanked: 63 times

Jan 18 2023

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";