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

Above code first i'm adding NASDAQ market and then using default market hours for USA.

Second i'm adding AAPL equity to strategy. This code is working but never OnData method calling! Any idea about that?

Please not that i'm using IQFeed data feed but i think the problem is not related to data feed.