Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
-22.115%
Drawdown
8.200%
Expectancy
0
Net Profit
-2.768%
Sharpe Ratio
-0.825
Probabilistic Sharpe Ratio
21.825%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.034
Beta
0.319
Annual Standard Deviation
0.181
Annual Variance
0.033
Information Ratio
0.558
Tracking Error
0.38
Treynor Ratio
-0.47
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
# Aroon 15m

class TestAlgorithm(QCAlgorithm):
    def Initialize(self):
        self.SetStartDate(2021,8,15)
        self.SetEndDate(2021,9,24)
        self.SetCash("BTC", 1)
        self.btc = self.AddCrypto("BTCUSD", Resolution.Minute).Symbol
        self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)
        self.Consolidate("BTCUSD", timedelta(minutes=15), self.FifteenMinuteBarHandler)        
        self.SetWarmUp(3*24*60, Resolution.Minute)
        self.aroon = AroonOscillator(25, 25)
        self.smafast = SimpleMovingAverage(1*24*60//15) 
        self.smaslow = SimpleMovingAverage(3*24*60//15)
        fifteenMinuteConsolidator = TradeBarConsolidator(timedelta(minutes=15))
        self.SubscriptionManager.AddConsolidator("BTCUSD", fifteenMinuteConsolidator)
        self.RegisterIndicator("BTCUSD", self.aroon, fifteenMinuteConsolidator)
        self.RegisterIndicator("BTCUSD", self.smafast, fifteenMinuteConsolidator)
        self.RegisterIndicator("BTCUSD", self.smaslow, fifteenMinuteConsolidator)
        
    
    def FifteenMinuteBarHandler(self, consolidated):
        if self.IsWarmingUp: return
        if not self.aroon.IsReady: return    
        if not self.smafast.IsReady or not self.smaslow.IsReady: return    
    
        price = self.Securities["BTCUSD"].Price
        self.Plot("Price Plot", "Price", price)
        self.Plot("Price Plot", "smafast", self.smafast.Current.Value)
        self.Plot("Price Plot", "smaslow", self.smaslow.Current.Value)
        
        self.Plot("AROON", "aroonup", self.aroon.AroonUp.Current.Value)
        self.Plot("AROON", "aroondown", self.aroon.AroonDown.Current.Value)