Overall Statistics
namespace QuantConnect 
{   
    public class FOREXBasicTemplateAlgorithm : QCAlgorithm
    {
    	Symbol symbol;
    	int quantity = 1000;
    	
        public override void Initialize()
        {
            SetStartDate(2016, 2, 1);         
            SetEndDate(2016, 2, 15); 
            SetCash(10000);
            symbol = AddForex("EURUSD", Resolution.Minute).Symbol;
        }

        public override void OnData(Slice slice) 
        {   
           if(!Portfolio.Invested)
           {
           		var filledPrice = slice[symbol].Price;
				MarketOrder(symbol, quantity, false, "Entry");     
				
				LimitOrder(symbol, -quantity, filledPrice + 0.01m, "Profit Target");
				StopMarketOrder(symbol, -quantity, filledPrice - 0.01m, "Stop Loss");
           }
        }
        
        public override void OnOrderEvent(OrderEvent orderEvent)
        {
        	Order actualOrder = Transactions.GetOrderById(orderEvent.OrderId);
            switch (orderEvent.Status)
            {
                case OrderStatus.Submitted:
	                Log(actualOrder.ToString());
                    break;
                case OrderStatus.Filled:
	                Log("\t => " +  orderEvent.ToString());
	                if (actualOrder.Type != OrderType.Market) { Liquidate(orderEvent.Symbol); } 
	                //Liquidate(orderEvent.Symbol);
                    break;
                case OrderStatus.Canceled:
	                Log("\t => " +  orderEvent.ToString() + "\n");
                    break;
                default:
                    break;
            }
        }
    }
}