Overall Statistics
Total Trades
730
Average Win
0.55%
Average Loss
-0.30%
Compounding Annual Return
101.954%
Drawdown
16.200%
Expectancy
0.056
Net Profit
6.356%
Sharpe Ratio
1.92
Probabilistic Sharpe Ratio
53.670%
Loss Rate
62%
Win Rate
38%
Profit-Loss Ratio
1.81
Alpha
1.322
Beta
-0.442
Annual Standard Deviation
0.622
Annual Variance
0.387
Information Ratio
1.434
Tracking Error
0.631
Treynor Ratio
-2.701
Total Fees
$0.00
Estimated Strategy Capacity
$650000.00
Lowest Capacity Asset
BTCUSD XJ
# Blackpanther Fractal Indicator (History)


class BlackpantherFractal(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 4, 5)
        self.SetEndDate(2021, 5, 6) 
        self.crypto = self.AddCrypto('BTCUSD', Resolution.Hour).Symbol
        self.signal = 0; 
        

    def OnData(self, data):

        H = self.History(self.crypto, 2, Resolution.Hour)['high']
        L = self.History(self.crypto, 2, Resolution.Hour)['low'] 
        
        upFractal = (L[-1] <= L[-2])
        dnFractal = (H[-1] >= H[-2])

        if upFractal and not dnFractal: self.signal = 1
        elif not upFractal and dnFractal: self.signal = -1 
        
        self.Plot("Indicator", "signal", self.signal)
        self.Plot("Indicator", "zero", 0)
        
        self.SetHoldings(self.crypto, self.signal)