Overall Statistics
Total Trades
127
Average Win
0.84%
Average Loss
-1.17%
Compounding Annual Return
5.670%
Drawdown
13.000%
Expectancy
0.196
Net Profit
31.769%
Sharpe Ratio
0.755
Probabilistic Sharpe Ratio
25.610%
Loss Rate
30%
Win Rate
70%
Profit-Loss Ratio
0.71
Alpha
0.047
Beta
0.003
Annual Standard Deviation
0.063
Annual Variance
0.004
Information Ratio
-0.602
Tracking Error
0.18
Treynor Ratio
14.069
Total Fees
$0.00
Estimated Strategy Capacity
$1500000.00
Lowest Capacity Asset
EURUSD 8G
using System;

namespace QuantConnect.Algorithm.CSharp
{
    public class BootCampTask : QCAlgorithm
    {
    	Stochastic stochastic;
    	Symbol symbol;
    	
        public override void Initialize()
        {
            SetStartDate(2016, 6, 14);
            SetEndDate(2021, 6, 14);
            SetCash(100000);
			symbol = AddForex("EURUSD", Resolution.Hour).Symbol;
			stochastic = STO(symbol, 240, Resolution.Hour);
			SetWarmup(240);
        }

        public override void OnData(Slice data)
        {
        	if (IsWarmingUp) return;
        	
        	if (Portfolio[symbol].Quantity <= 0 && stochastic < 20)
        	{
        		SetHoldings(symbol, 1);
        	}
        	else if (Portfolio[symbol].Quantity >= 0 && stochastic > 80)
        	{
        		SetHoldings(symbol, -1);
        	}
        }
    }
}