Overall Statistics
namespace QuantConnect.Algorithm.CSharp{
    public class BasicTemplateAlgorithm : QCAlgorithm {
    	
    	String symbol = "EURUSD";
        decimal open;
        decimal close;
        decimal low;
        decimal high;
        int size = 10;
       // TimeFrame tf = new TimeFrame(15);
    	
        public override void Initialize(){
        	
        	//SetTimeZone(TimeZones.Berlin);
        	AddSecurity(SecurityType.Forex, symbol, Resolution.Daily);
        	//SetTimeZone(TimeZones.NewYork);
        	
            SetStartDate(2018, 02, 21);  //Set Start Date
            SetEndDate(2018, 02, 22);    //Set End Date
            SetCash(100000);             //Set Strategy Cash

        }

        public override void OnData(Slice data){
    
        	
        	close = data[symbol].Close;
        	open = data[symbol].Open;
        	high = data[symbol].High;
        	low = data[symbol].Low;
        	
        	Debug("Close: "+close.ToString("G"));
        	Debug("Open: "+open.ToString("G"));
        	Debug("High: "+high.ToString("G"));
        	Debug("Low: "+low.ToString("G"));
        	Debug("Time : "+Time.ToString());
        	Debug("--------------------------");
        	
        	SetHoldings(symbol, size);
        	
        	/*
        	//Debug(close.ToString("G"));
        	//Debug("Time : "+Time.ToString());
        	//Debug(tf.getCount());
        	//Debug("--------------------------");
        	
        	if(tf.isReady(open, close, high, low) == false){
        		return;
        	} else {
        		Debug("Close: "+close.ToString("G"));
        		Debug("Open: "+open.ToString("G"));
        		Debug("High: "+high.ToString("G"));
        		Debug("Low: "+low.ToString("G"));
        		
        		Debug("Time : "+Time.ToString());
        		Debug("--------------------------");
        		SetHoldings(symbol, size);
        	}
        	*/
        	
        	
        	
        	
 
        }
    }
}
namespace QuantConnect {
	
	public class TimeFrame {
		private decimal open;
		private decimal close;
		private decimal high;
		private decimal low;
		private int timeFrame;
		private int count = 0;
		
		public TimeFrame(int n){
			timeFrame = n;
		}
		
		public bool isReady(decimal openPrice, decimal closePrice, decimal highPrice, decimal lowPrice){
			if(count == 0){
				open = openPrice;
				high = highPrice;
				low = lowPrice;
				count++;
				return false;
			} else {
				if(highPrice > high){
					high = highPrice;
				} if(low < lowPrice){
					low = lowPrice;
				} count++;
				if(count == timeFrame){
					count = 0;
					close = closePrice;
					return true;
				} else return false;
			} 
		}
		
		public decimal getOpen(){
			return open;
		}
		
		public decimal getClose(){
			return close;
		}
		
		public decimal getLow(){
			return low;
		}
		
		public decimal getHigh(){
			return high;
		}
		
		public String getCount(){
			int temp = 1+count;
			
			return temp.ToString();
		}
	}
}