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
    {
		bool once;
        /// <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(2013, 10, 07);  //Set Start Date
            SetEndDate(2013, 10, 11);    //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.
            AddForex("USDJPY", Resolution.Minute);

        }

        /// <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)
        {
            if (!once)
            {
            	once = true;
				MarketOrder("USDJPY",10000);
				//Take Profit (Sell) at 50 pips above 
				var takeProfit = LimitOrder("USDJPY", -10000, data["USDJPY"].Close + 
				Securities["USDJPY"].SymbolProperties.MinimumPriceVariation*50*10);//i think this is 25 pips
				
				Debug("Current : " + (data["USDJPY"].Close));
				Debug("Increased price : " + (data["USDJPY"].Close + Securities["USDJPY"].SymbolProperties.MinimumPriceVariation*50*10));
				
				//Stop Loss (Sell) at 25 pips below
				//var stopLoss = StopMarketOrder("USDJPY", -10000, data["USDJPY"].Close - 
				//Securities["USDJPY"].SymbolProperties.MinimumPriceVariation*25*10);
            }
        }
    }
}