Hi, I'm trying to use the macd strategy with quantconnect, I'm trying to detect when the fast line crosses up the slow line of the MACD and print it with the debug function with the time in when it happened.

The problem that I'm facing is that in tradingview, that happens a lot more than in my program and the points aren't even the same

I've already tried comparing self.macd.Fast with self.macd.Slow and self.macd with self.macd.Signal.

I'e also rode this: 

But that does not explain why my code outputs much les crosover points than tradingview

What am I doing wrong?

184354_1641931928.jpg184354_1641931937.jpg
class CasualSkyBlueFly(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 12, 1)  # Set Start Date
        self.SetEndDate(2021, 12, 31)  # Set Start Date
        self.SetCash(1000)  # Set Strategy Cash
        self.AddEquity("BTC", Resolution.Hour)
        

        self.macd = self.MACD("BTC", 12, 26, 9, MovingAverageType.Exponential, Resolution.Hour)
        self.SetWarmUp(200)

        self.MACD_UP_Window = RollingWindow[bool](2)
        self.Debug("-------------------------------------------------------------------------------------------------------------------")
        
    def OnData(self, data):
        #Update indicators

        self.macd.Update(self.Time, data["BTC"].Close)

        if not self.macd.IsReady:
            return
        
        if self.macd.Fast > self.macd.Slow:
            self.MACD_UP_Window.Add(True)
        else:
            self.MACD_UP_Window.Add(False)
            
        if not self.MACD_UP_Window.IsReady:
            return            
            
        #Check MACD
        if self.MACD_UP_Window[0] and not self.MACD_UP_Window[1]:
            self.Debug("MACD - YEAR: " + str(self.Time.year) + "/MONTH: " + str(self.Time.month) + "/DAY: " + str(self.Time.day ) + "/HOUR: " + str(self.Time.hour))
            self.Debug("MACD - short: " + str(self.macd.Fast) + "/long: " + str(self.macd.Slow))