Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
-10.38%
Compounding Annual Return
-71.417%
Drawdown
11.700%
Expectancy
-1
Net Profit
-10.398%
Sharpe Ratio
-4.968
Loss Rate
100%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.661
Beta
-0.668
Annual Standard Deviation
0.166
Annual Variance
0.027
Information Ratio
-5.664
Tracking Error
0.188
Treynor Ratio
1.233
Total Fees
$359.93
namespace QuantConnect.Algorithm.CSharp
{
    public class DualSellOrderTest : QCAlgorithm
    {
    	private OrderTicket EntryOrder { get; set; }
    	private bool once = true;
    	    	
        public override void Initialize()
        {
            SetStartDate(2018, 8, 1);  //Set Start Date
            SetEndDate(2018, 9, 1);  //Set Start Date
            SetCash(100000);             //Set Strategy Cash
            SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin);
            var btc = AddCrypto("BTCUSD", Resolution.Hour);
        }
        
        public override void OnData(Slice data)
        {
        	if (once)        
        	{
				once = false;
				var usdTotal = Portfolio.CashBook["USD"].Amount;
				var limitPrice = Math.Round(Securities["BTCUSD"].Price, 2);
				var quantity = usdTotal * 0.95m / limitPrice;
	
	            EntryOrder = MarketOrder("BTCUSD", quantity, false, "Entry");
	            var filledPrice = this.EntryOrder.AverageFillPrice;
	            StopMarketOrder("BTCUSD", -quantity, Math.Round(filledPrice * (.90m), 2), "Stop Loss");
        	}
        	
        }
    }
}