Overall Statistics
namespace QuantConnect.Algorithm.CSharp
{
    public class TransdimensionalVentralFlange : QCAlgorithm
    {
    	IEnumerable<Symbol> MyCoarseFilterFunction(IEnumerable<CoarseFundamental> coarse) {
	        var stocks = (from c in coarse
	            where c.DollarVolume > 3000000 &&
	                  c.Price > 15
	            orderby c.DollarVolume descending
	            select c.Symbol).Take(1).ToList();
	        return stocks;
	    }
		
		Symbol symbol;
		
        public override void Initialize()
        {
            SetStartDate(2019, 9, 10);  //Set Start Date
            SetEndDate(2019, 9, 11);  //Set Start Date
            SetCash(100000);             //Set Strategy Cash
            
            symbol = AddEquity("SPY", Resolution.Minute).Symbol;

			//UniverseSettings.Resolution = Resolution.Minute;
			//AddUniverse(MyCoarseFilterFunction);
        }

        /// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
        /// Slice object keyed by symbol containing the stock data
        public override void OnData(Slice data)
        {	
        	Debug($" Data Contains Symbol: {data.ContainsKey(symbol)}");
        	Debug($" Data Contains Ticker: {data.ContainsKey(symbol.Value)}");
        	
        	
            foreach(var symbol in data.Keys){
            	Debug($"Symbol: {symbol}, Data Contains Symbol?: {data.ContainsKey(symbol)} --- Ticker: {symbol.Value}, Data Contains Ticker?: {data.ContainsKey(symbol.Value)}");
            }
        }
	
		
		public override void OnSecuritiesChanged(SecurityChanges changes)
        {
        	Debug($"Main->OnSecuritiesChanged({changes.RemovedSecurities.Count}), RemovedSecurities: "+string.Join(",", changes.RemovedSecurities.Select(x => x.Symbol.Value)));
        	Debug($"Main->OnSecuritiesChanged({changes.AddedSecurities.Count}), AddedSecurities: "+string.Join(",", changes.AddedSecurities.Select(x => x.Symbol.Value)));


        	foreach (var removed in changes.RemovedSecurities)
            {
            	
            }
                
        	foreach (var added in changes.AddedSecurities)
            {
            
            }
			
        }
		
    }
}