Overall Statistics
namespace QuantConnect 
{   
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
    	private AverageTrueRange _atrDefault;
        private AverageTrueRange _atrExponential;
        
        public override void Initialize() 
        {
		    SetStartDate(2013, 1, 1);         
            
            AddSecurity(SecurityType.Equity, "SPY", Resolution.Daily);
            _atrDefault = ATR("SPY", 8);
            _atrExponential = ATR("SPY", 8, MovingAverageType.Exponential);
        }

        public void OnData(TradeBars data) 
        {   
            if (!Portfolio.HoldStock) SetHoldings("SPY", 1);
        }
        
        public override void OnEndOfDay()
        {
        	Plot("ATR", "ATR default", _atrDefault);
        	Plot("ATR", "Exponential", _atrExponential);
        }
    }
}