Overall Statistics
namespace QuantConnect.Algorithm.CSharp
{
    /// <summary>
    /// Basic template algorithm simply initializes the date range and cash. This is a skeleton
    /// framework you can use for designing an algorithm.
    /// </summary>
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
        //private Symbol _spy = QuantConnect.Symbol.Create("KH33HKD", SecurityType.Cfd, Market.Oanda);

        /// <summary>
        /// Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
        /// </summary>
        public override void Initialize()
        {
            SetStartDate(2016, 11, 10);  //Set Start Date
            SetEndDate(2016, 12, 22);    //Set End Date
            SetCash(100000);             //Set Strategy Cash

            // Find more symbols here: http://quantconnect.com/data
            // Forex, CFD, Equities Resolutions: Tick, Second, Minute, Hour, Daily.
            // Futures Resolution: Tick, Second, Minute
            // Options Resolution: Minute Only.
            AddSecurity(SecurityType.Cfd,"HK33HKD", Resolution.Minute, Market.Oanda, true, 100, false);


            // There are other assets with similar methods. See "Selecting Options" etc for more details.
            // AddFuture, AddForex, AddCfd, AddOption
                        Schedule.On(DateRules.On(2016,12,12),TimeRules.At(2, 30), () =>
            {
            	Log("marketorder");
                var t = MarketOrder("HK33HKD", 45);
				StopMarketOrder("HK33HKD", -45,22837.3m);
					Log(string.Format("{0}",Time));
            });
        }

        /// <summary>
        /// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
        /// </summary>
        /// <param name="data">Slice object keyed by symbol containing the stock data</param>
        public override void OnData(Slice data)
        {

        }
    }
}