def __init__(self, barDataSeries, reversalLines, useAdjustedValues=False, maxLen=None):
        if not isinstance(barDataSeries, bards.BarDataSeries):
            raise Exception("barDataSeries must be a dataseries.bards.BarDataSeries instance")
        if reversalLines < 2:
            raise Exception("reversalLines must be greater than 1")
        if dataseries.get_checked_max_len(maxLen) < reversalLines:
            raise Exception("maxLen can't be smaller than reversalLines")

        super(LineBreak, self).__init__(maxLen)

        self.__reversalLines = reversalLines
        self.__useAdjustedValues = useAdjustedValues

        barDataSeries.getNewValueEvent().subscribe(self.__onNewBar)
dataset/ETHPy150Open gbeced/pyalgotrade/pyalgotrade/technical/linebreak.py/LineBreak.__init__/original