def METHOD_NAME(self, default_tf):
    tf = {
        1: TimeFrame.M1,
        5: TimeFrame.M5,
        15: TimeFrame.M15,
        30: TimeFrame.M30,
        60: TimeFrame.H1,
        240: TimeFrame.H4,
        1440: TimeFrame.D1,
    }
    minutes = int(np.diff(self.time[-10:]).min() / 60)
    self.timeframe = tf.get(minutes) or tf[default_tf]