Overall Statistics
using System;
using System.Linq;
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Orders;
using QuantConnect.Securities;

namespace QuantConnect.Algorithm.CSharp
{
    public class BasicTemplateFuturesAlgorithm : QCAlgorithm
    {
        private const string RootSP500 = Futures.Indices.SP500EMini;
        public Symbol SP500 = QuantConnect.Symbol.Create(RootSP500, SecurityType.Future, Market.USA);

        public override void Initialize()
        {
            SetStartDate(2016, 08, 17);
            SetEndDate(2016, 08, 20);
            SetCash(1000000);

            var futureSP500 = AddFuture(SP500.Underlying.Value);
            futureSP500.SetFilter(TimeSpan.Zero, TimeSpan.FromDays(182));
			
            //var consolidator = new TradeBarConsolidator(TimeSpan.FromMinutes(5));
            //consolidator.DataConsolidated += OnDataConsolidated;
            //SubscriptionManager.AddConsolidator(SP500.Value, consolidator);			

            var benchmark = AddEquity("SPY");
            SetBenchmark(benchmark.Symbol);
        }

        public void OnDataConsolidated(object sender, TradeBar tradeBar)
        {
        }
    }
}