Closed aytacasan closed 4 years ago
@aytacasan - most US equities are listed on multiple exchanges. To help with this, there's a "logical exchange" (for want of a better word) - Market.USA, which is the one equities currently support. I believe at this point in time, only futures support the market in the way you're trying to use them
The market segmentation is based on whether the asset is fungible. e.g. Can you buy on IEX and sell on NASDAQ? Yes; so they're all under Market.USA
Perhaps @aytacasan you could zoom out a little and share what you're trying to achieve with IQFeed? You do not need to edit the markets to use Equities+IQFeed.
Expected Behavior
After add security to srategy with initialize method, expecting to receive it's data (tick and/or bar) with OnData method.
Actual Behavior
Never calling OnData method.
Potential Solution
I'm not sure and don't understand why i have to use Market.USA when add seurity to algorithm. Maybe the problem is IQFeedDataQueueUniverseProvider.cs code files's LoadSymbols method adding all equities with Market.USA.
Reproducing the Problem
private int _code = 100;
private void AddMarketIfNotExist(string market) { var code = Market.Encode(market.ToLower()); if (code == null) { Market.Add(market, _code++); } }
AddMarketIfNotExist("NASDAQ");
var entry = MarketHoursDatabase.GetEntry(Market.USA, string.Empty, SecurityType.Equity); MarketHoursDatabase.SetEntry("nasdaq", string.Empty, SecurityType.Equity, entry.ExchangeHours, entry.DataTimeZone);
AddSecurity(SecurityType.Equity, "AAPL", Resolution.Minute, "nasdaq", false, 0, true);
System Information
Windows 10 IQFeed Client Visual Studio 2019
Checklist
master
branch