Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
86.485%
Drawdown
51.300%
Expectancy
0
Net Profit
86.792%
Sharpe Ratio
1.336
Probabilistic Sharpe Ratio
49.692%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.814
Beta
-0.232
Annual Standard Deviation
0.572
Annual Variance
0.327
Information Ratio
0.944
Tracking Error
0.586
Treynor Ratio
-3.3
Total Fees
$0.27
namespace QuantConnect.Algorithm.CSharp
{
    public class VentralTransdimensionalChamber : QCAlgorithm
    {
    	/* 
    		Trading bot that trades with the highest and lowest exchange rate of the last 24 hours.
    		Buying determined bacause the factor and the current price.
    	*/
        
        // VARIABELEN DECLAREREN
        private string _ticker = "ETHBTC";            //virtueel paar - tracks the current USD value of 1 ether.
        private int _startingCash = 100000;
        private decimal _weight = .08m;             ///Percentage van portfolio dat je wilt investeren // % of portfolio for every trade.
        
        private decimal _targetPercent = .01m;        //1% winst dan verkopen // Sell when 1% profit
        private decimal _stopPercent = .10m;        //verkopen bij de 10% verlies / Sell when loss is 10%
        
        int _maxPosition = 900;                    // Max USD invested
        int _minPosition = 750;                        // min USD needed to invest.
        
        public decimal _usd;                            //Amount of USD in our Cashbook.
        
        Maximum _maxExchange;
        Minimum _minExchange;
        

  
        //PROGRAMMA VARIABELEN
        public  decimal _price;
        public decimal _holding;            //Het aantal Ether we in onze portfolio hebben zitten.
        public string _baseSymbol;            //vertegenwoordigt de basesymbool dat we houden ETH
        
        
        
        public decimal _targetPrice;
        public decimal _stopPrice;

      
        
  
        
        //INITIALIZE BLOCK
        public override void Initialize()
        {
            SetStartDate(2019, 1, 1); 
            SetEndDate(2020, 1, 1);
            //SetCash(_startingCash); 
    		SetCash("BTC", 10000);
            
            var _crypto = AddCrypto(_ticker, Resolution.Minute, Market.Bitfinex);
            _baseSymbol = _crypto.BaseCurrencySymbol;
            
            int _minutesOfTrading = 1140;
            _maxExchange = MAX(_ticker, _minutesOfTrading, Resolution.Minute);
            _minExchange = MIN(_ticker, _minutesOfTrading, Resolution.Minute);
            
            SetWarmUp(_minutesOfTrading, Resolution.Minute);
            
            SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash);
        }
        
        public override void OnData(Slice data)
        {
        	if (!Portfolio.Invested) 
        	{
        		
        		MarketOrder("ETHBTC", 1);
        	}
        }
        
    } 
}