Overall Statistics
namespace QuantConnect 
{
    public partial class CoveredCallAlgorithm : QCAlgorithm
    {
    	Symbol _optionSymbol;
		// Manual add symbols required in your initialize method:
		public override void Initialize() {
		     SetStartDate(2015, 8, 8);
            SetEndDate(2015,11, 12);

		    var option = AddOption("GOOG", Resolution.Minute);
		    _optionSymbol = option.Symbol;
		    // set our strike/expiry filter for this option chain
		    option.SetFilter(-2, +2, TimeSpan.Zero, TimeSpan.FromDays(10));
		}
		
		// v3.0 Technique: Access data via grouped time slice method handlers:
		public override void OnData(Slice slice) {
		    OptionChain chain;
		    if (slice.OptionChains.TryGetValue(_optionSymbol, out chain))
		    {
		        // find the second call strike under market price expiring today
		        var contract = (
		            from optionContract in chain.OrderByDescending(x => x.Strike)
		            where optionContract.Right == OptionRight.Call
		            where optionContract.Expiry == Time.Date
		            where optionContract.Strike < chain.Underlying.Price
		            select optionContract
		            ).Skip(2).FirstOrDefault();
		
		        if (contract != null)
		        {
		            var quantity = CalculateOrderQuantity(contract.Symbol, -1m);
		            MarketOrder(contract.Symbol, quantity);
		            MarketOnCloseOrder(contract.Symbol, -quantity);
		        }else{
		        	Log("no contract");
		        }
		    }else{
		    	Log("no chain available");
		    }
		}
    }
}