Overall Statistics
namespace QuantConnect 
{   
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
        public override void Initialize() 
        {
			
            //Start and End Date range for the backtest:
            SetStartDate(2016, 1, 1);         
            SetEndDate(DateTime.Now.Date.AddDays(-1));
            
            //Cash allocation
            SetCash(100000);
            
            //Add as many securities as you like. All the data will be passed into the event handler:
            AddSecurity(SecurityType.Forex, "EURUSD", Resolution.Hour);
            AddSecurity(SecurityType.Forex, "USDCHF", Resolution.Hour);
            AddSecurity(SecurityType.Forex, "GBPJPY", Resolution.Hour);
            AddSecurity(SecurityType.Forex, "AUDNZD", Resolution.Hour);
        }

        public void OnData(TradeBars data) 
        {   
            if (Time.DayOfWeek == DayOfWeek.Monday && !Portfolio["EURUSD"].Invested) 
            {
                //Order function places trades: enter the string symbol and the quantity you want:
                SetHoldings("EURUSD", .5);
                SetHoldings("USDCHF", .5);
                
                //Debug sends messages to the user console: "Time" is the algorithm time keeper object 
                Debug("Purchased EURUSD and USDCHF on " + Time.ToShortDateString());
            }
            
            if (Time.DayOfWeek == DayOfWeek.Tuesday && !Portfolio["GBPJPY"].Invested)
            {
             	SetHoldings("GBPJPY", -.5);
                SetHoldings("AUDNZD", -.5);
                
                Debug("Sell GBPJPY and AUDNZD on " + Time.ToShortDateString());
            }
            
            if (Time.DayOfWeek == DayOfWeek.Friday)
            {
            	Liquidate();
            	Debug("Liquidate " + Time.ToShortDateString());
            }
            
        }
    }
}