Overall Statistics
Total Trades
6
Average Win
0%
Average Loss
0%
Compounding Annual Return
65454150.795%
Drawdown
16.500%
Expectancy
0
Net Profit
59.891%
Sharpe Ratio
6.122
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
752.438
Annual Standard Deviation
1.575
Annual Variance
2.48
Information Ratio
6.114
Tracking Error
1.575
Treynor Ratio
0.013
Total Fees
$381.07
namespace QuantConnect.Algorithm.CSharp
{
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
    	decimal cashLeft = 100000;
    	
        public override void Initialize()
        {
            SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash);
            SetStartDate(2017, 12, 01);  //Set Start Date
            SetEndDate(2017, 12, 12);    //Set End Date
            SetCash(cashLeft);             //Set Strategy Cash
            AddCrypto("BTCUSD", Resolution.Daily, Market.GDAX, leverage: 1);
        }

        public override void OnData(Slice data)
        {
        	Plot("Crypto", "BTCUSD", data.Bars["BTCUSD"].Close);
        	
        	Debug(Time + " --> Quantity: " + Portfolio["BTCUSD"].Quantity + " coins and USD: " + Portfolio.CashBook["USD"].Amount);
        	
        	if (Portfolio.GetBuyingPower("BTCUSD") > data.Bars["BTCUSD"].Close)
        	{
        		var ticket = MarketOrder("BTCUSD", 2);
            	if (ticket.Status == OrderStatus.Filled)
				{
    				//Debug("Purchased another coin: " + Time);
				}
				else
				{
					//Debug("Failed Fill");
				}
        	}
        	else
        	{
        		Debug("Not enough buying power"); 
        	}
        }
    }
}