Overall Statistics
namespace QuantConnect  {

    public class BasicTemplateAlgorithm : QCAlgorithm {
		string symbol = "AAPL";
		decimal minBuyChage = -0.01m;
		decimal minSellChage = 0.01m;
		decimal basePrice = 0;

        public override void Initialize()  {
			Debug("Initialize()");

			SetStartDate(new DateTime(2017, 1, 1));

			SetCash(25000);
			
			AddEquity(symbol, Resolution.Minute);
        }

        public void OnData(TradeBars bars)  {
        	if (!bars.ContainsKey(symbol)) {
        		return;
        	}
        	TradeBar bar = bars[symbol];
        	decimal price = bar.Close;
        	if (basePrice == 0) {
        		basePrice = price;
        	}
        	decimal change = (price - basePrice) / basePrice;
        	if (change < minBuyChage) {
        		SetHoldings(symbol, 1);
        		basePrice = price;
        	} else if (change > minSellChage) {
        		SetHoldings(symbol, 0);
        		basePrice = price;
        	}
        }

		public override void OnEndOfAlgorithm() {
			Debug("OnEndOfAlgorithm()");
		}

    }
}