Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
3.021
Tracking Error
0.269
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
# Four hour indicators test

from AlgorithmImports import *

class DeterminedRedCat(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022, 6, 1)
        self.SetEndDate(2022, 6, 17)
        self.SetCash(100000)        
        self.btc = self.AddCrypto("BTCUSD", Resolution.Minute, Market.GDAX).Symbol 
        Consolidator = TradeBarConsolidator(timedelta(hours=4))
        Consolidator.DataConsolidated += self.BarHandler
        self.SubscriptionManager.AddConsolidator(self.btc, Consolidator)        
        self.macd = MovingAverageConvergenceDivergence(12, 26, 9, MovingAverageType.Exponential)
        self.RegisterIndicator(self.btc, self.macd, Consolidator)        
        self.dmi = AverageDirectionalIndex(14)
        self.RegisterIndicator(self.btc, self.dmi, Consolidator)        
        self.emaTwelve = ExponentialMovingAverage(12)
        self.RegisterIndicator(self.btc, self.emaTwelve, Consolidator) 
        self.SetWarmup(5*35*4, Resolution.Hour)


    def BarHandler(self, sender, bar):
        if self.IsWarmingUp: return     
        if not self.macd.IsReady or not self.dmi.IsReady or not self.emaTwelve.IsReady: return

        self.Plot(self.btc, "Close", self.Securities[self.btc].Close)
        self.Plot(self.btc, "emaTwelve", self.emaTwelve.Current.Value)
        self.Plot("ADX", "ADX", self.dmi.Current.Value)
        self.Plot("ADX", "DMI+", self.dmi.PositiveDirectionalIndex.Current.Value)
        self.Plot("ADX", "DMI-", self.dmi.NegativeDirectionalIndex.Current.Value)
        self.Plot("MACD", "MACD", self.macd.Current.Value)
        self.Plot("MACD", "Histogram:", self.macd.Histogram.Current.Value)