Overall Statistics
Total Trades
32096
Average Win
0.01%
Average Loss
-0.01%
Compounding Annual Return
-11.910%
Drawdown
2.800%
Expectancy
-0.006
Net Profit
-1.140%
Sharpe Ratio
-1.836
Loss Rate
52%
Win Rate
48%
Profit-Loss Ratio
1.07
Alpha
-0.071
Beta
0.03
Annual Standard Deviation
0.047
Annual Variance
0.002
Information Ratio
2.295
Tracking Error
0.186
Treynor Ratio
-2.917
Total Fees
$0.00
using MathNet.Numerics;
namespace QuantConnect 
{   
    
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
    	public string pair1 = "EURUSD";

        public override void Initialize() 
        {
        	SetStartDate(2016,01,01);
            SetEndDate(2016, 02, 02);         

            SetBrokerageModel(BrokerageName.OandaBrokerage);
            
            SetCash(10000);

            AddForex(pair1, Resolution.Minute, Market.Oanda);
        }
        
	    public void OnData(TradeBars data) {

			var close = (double)data[pair1].Close;
			// Entry
			if(!Portfolio.Invested){
				SetHoldings(pair1, 1);
			}
			else{
				Liquidate();
			}
			
        }
    	public override void OnEndOfDay()
    	{
    		Plot(pair1, "EOD", Securities[pair1].Close);
    	}
	
    }
}