Overall Statistics
Total Trades
66
Average Win
0.05%
Average Loss
-0.03%
Compounding Annual Return
54.362%
Drawdown
0.200%
Expectancy
0.341
Net Profit
0.357%
Sharpe Ratio
8.336
Probabilistic Sharpe Ratio
0%
Loss Rate
48%
Win Rate
52%
Profit-Loss Ratio
1.60
Alpha
-0.773
Beta
1.009
Annual Standard Deviation
0.041
Annual Variance
0.002
Information Ratio
-2166.145
Tracking Error
0
Treynor Ratio
0.336
Total Fees
$0.00
Estimated Strategy Capacity
$64000.00
Lowest Capacity Asset
BTCUSD XJ
# Blackpanther Fractal-2 Indicator (window v2)

class BlackpantherFractal(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 4, 6)
        self.SetEndDate(2021, 4, 8) 
        self.SetCash(100000)  
        self.crypto = self.AddCrypto("BTCUSD", Resolution.Minute, Market.GDAX).Symbol
        self.window = RollingWindow[TradeBar](3)
        self.signal = 0 
        

    def OnData(self, data):
        if not self.crypto in data.Bars: return
        self.window.Add(data.Bars[self.crypto])
        if not self.window.IsReady: return
    
        H = [self.window[i].High for i in range(3)]
        L = [self.window[i].Low for i in range(3)]
        C = [self.window[i].Close for i in range(3)]

        if (C[0] == L[1] < L[2]): self.signal = 1
        elif (C[0] == H[1] > H[2]): self.signal = -1
        else: self.signal = 0

        self.SetHoldings(self.crypto, self.signal)