I am new, and not so very smart , 😊..  

my algo uses consolidated 200 Resolution.Minute bars, and gives me over 200% profit over a 2 year back test. , and sharpie ratio over 1 .

but I find it strange is, I change minutes from 200 to 199, I get completely different result, I get a loss over the same period..

similarly if change 200 to 201, I get very different results….. 

is this normal, for such a small change ?    What am I doing wrong ?

that's my code below

STOCK = "QQQ";  BAR = 150; SL = -0.033; TP = 0.05; ATR = 1; MULT = 0.15;   
# --------------------------------------------



class SuperTrendIndicator(QCAlgorithm):
    
    def Initialize(self):
        self.SetStartDate(DateTime(2000, 5, 17, 9, 30, 0))  
        self.SetEndDate(DateTime(2004, 6, 1, 16, 0, 0)) 
        self.SetCash(200000)
        res = Resolution.Minute

        #ATR = int(self.GetParameter("ATR_A"))   
        #MULT = float(self.GetParameter("MULT_A"))
        self.stock = self.AddEquity(STOCK, res, extendedMarketHours = True).Symbol
        consolidator = TradeBarConsolidator(timedelta(minutes = BAR))
        self.Consolidate(self.stock, timedelta(minutes = BAR), self.BarHandler)
        self.st = SuperTrend(ATR, MULT, MovingAverageType.Wilders)
        self.RegisterIndicator(self.stock, self.st, consolidator)

        self.SetWarmUp(50*BAR*ATR, res)
        
    

    


    def BarHandler(self, consolidated):
        
        if self.IsWarmingUp: return

        if not self.st.IsReady: return

         


        self.Plot(STOCK, "Price", self.Securities[self.stock].Price)
        self.Plot(STOCK, "Super Trend", self.st.Current.Value)

       


        pnl = self.Securities[self.stock].Holdings.UnrealizedProfitPercent


        if self.Securities[self.stock].High > self.st.Current.Value and self.Securities[self.stock].Open < self.Securities[self.stock].High:      # trend is bullish  
            self.SetHoldings(self.stock, 1, True, "Buy Signal")

                    
        
        elif self.Securities[self.stock].Low < self.st.Current.Value and self.Securities[self.stock].Open > self.Securities[self.stock].Low:   
            self.SetHoldings(self.stock, -1, True, "Sell Signal")
            #self.Liquidate(self.stock, "Sell Signal")
           


        if self.Portfolio[self.stock].Invested: 
            if pnl < SL:
                self.Liquidate(self.stock, "Stop Loss")
            elif pnl > TP:
                self.Liquidate(self.stock, "Take Profit")