Overall Statistics
Total Trades
2
Average Win
0.05%
Average Loss
0%
Compounding Annual Return
3.957%
Drawdown
0.100%
Expectancy
0
Net Profit
0.051%
Sharpe Ratio
4.066
Loss Rate
0%
Win Rate
100%
Profit-Loss Ratio
0
Alpha
-0.125
Beta
13.593
Annual Standard Deviation
0.006
Annual Variance
0
Information Ratio
2.43
Tracking Error
0.006
Treynor Ratio
0.002
Total Fees
$0.00
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);
            }
        }
    }
}