Exemple #1
0
    def __init__(self,
                 period: int,
                 input_values: List[float] = None,
                 input_indicator: Indicator = None):
        super().__init__()

        self.period = period

        self.ema = EMA(period)
        self.add_sub_indicator(self.ema)

        self.ema_ema = EMA(period)
        self.add_managed_sequence(self.ema_ema)

        self.initialize(input_values, input_indicator)
Exemple #2
0
    def __init__(self,
                 period: int,
                 input_values: List[float] = None,
                 input_indicator: Indicator = None,
                 value_extractor: ValueExtractorType = None):
        super().__init__(value_extractor=value_extractor)

        self.period = period

        self.ema1 = EMA(period)
        self.ema2 = EMA(period, input_indicator=self.ema1)
        self.ema3 = EMA(period, input_indicator=self.ema2)

        self.add_sub_indicator(self.ema1)

        self.initialize(input_values, input_indicator)
Exemple #3
0
    def __init__(self, period: int, input_values: List[OHLCV] = None):
        super().__init__()

        self.ema = EMA(period)
        self.add_managed_sequence(self.ema)

        self.initialize(input_values)
Exemple #4
0
    def __init__(self,
                 fast_period: int,
                 slow_period: int,
                 signal_period: int,
                 input_values: List[float] = None,
                 input_indicator: Indicator = None):
        super().__init__()

        self.ema_fast = EMA(fast_period)
        self.ema_slow = EMA(slow_period)
        self.signal_line = EMA(signal_period)

        self.add_sub_indicator(self.ema_fast)
        self.add_sub_indicator(self.ema_slow)
        self.add_managed_sequence(self.signal_line)

        self.initialize(input_values, input_indicator)
Exemple #5
0
    def __init__(self,
                 fast_period: int,
                 slow_period: int,
                 input_values: List[float] = None,
                 input_indicator: Indicator = None,
                 value_extractor: ValueExtractorType = None):
        super().__init__(value_extractor=value_extractor)

        self.slow_ema = EMA(slow_period)
        self.add_managed_sequence(self.slow_ema)
        self.fast_ema = EMA(fast_period, input_indicator=self.slow_ema)

        self.abs_slow_ema = EMA(slow_period)
        self.add_managed_sequence(self.abs_slow_ema)
        self.abs_fast_ema = EMA(fast_period, input_indicator=self.abs_slow_ema)

        self.initialize(input_values, input_indicator)
Exemple #6
0
    def __init__(self,
                 ema_period: int,
                 ema_ema_period: int,
                 ema_ratio_period: int,
                 input_values: List[OHLCV] = None):
        super().__init__()

        self.ema_ratio_period = ema_ratio_period

        self.ema = EMA(ema_period)
        self.ema_ema = EMA(ema_ema_period)
        self.ema_ratio = []

        self.add_managed_sequence(self.ema)
        self.add_managed_sequence(self.ema_ema)
        self.add_managed_sequence(self.ema_ratio)

        self.initialize(input_values)
Exemple #7
0
    def __init__(self,
                 period_fast: int,
                 period_slow: int,
                 input_values: List[OHLCV] = None):
        super().__init__()

        self.period_fast = period_fast
        self.period_slow = period_slow

        self.accu_dist = AccuDist()
        self.add_sub_indicator(self.accu_dist)

        self.ema_fast = EMA(period_fast)
        self.add_managed_sequence(self.ema_fast)

        self.ema_slow = EMA(period_slow)
        self.add_managed_sequence(self.ema_slow)

        self.initialize(input_values)
Exemple #8
0
    def __init__(self,
                 fast_period: int,
                 slow_period: int,
                 input_values: List[OHLCV] = None):
        super().__init__()

        self.fast_ema = EMA(fast_period)
        self.add_managed_sequence(self.fast_ema)

        self.slow_ema = EMA(slow_period)
        self.add_managed_sequence(self.slow_ema)

        self.trend = []
        self.add_managed_sequence(self.trend)

        self.cumulative_measurement = []
        self.add_managed_sequence(self.cumulative_measurement)

        self.initialize(input_values)
Exemple #9
0
    def __init__(self,
                 ma_period: int,
                 atr_period: int,
                 atr_mult_up: float,
                 atr_mult_down: float,
                 input_values: List[OHLCV] = None):
        super().__init__()

        self.atr_mult_up = atr_mult_up
        self.atr_mult_down = atr_mult_down

        self.atr = ATR(atr_period)
        self.cb = EMA(ma_period, value_extractor=ValueExtractor.extract_close)

        self.add_sub_indicator(self.cb)
        self.add_sub_indicator(self.atr)

        self.initialize(input_values)