How to use the finta.TA.CHAIKIN function in finta

To help you get started, we’ve selected a few finta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peerchemist / finta / tests / test_unit.py View on Github external
def test_chaikin():
    """test TA.CHAIKIN"""

    c = TA.CHAIKIN(ohlc)

    assert isinstance(c, series.Series)
    assert c.values[-1] == 650594.74888467789
github SC4RECOIN / NeuroEvolution-BTC-Trader / utils / data.py View on Github external
def calc_ta(self):
        ta = [
            TA.ER(self.ohlc),
            TA.PPO(self.ohlc)["HISTO"],
            TA.STOCHRSI(self.ohlc),
            TA.ADX(self.ohlc),
            TA.RSI(self.ohlc),
            TA.COPP(self.ohlc),
            TA.CCI(self.ohlc),
            TA.CHAIKIN(self.ohlc),
            TA.FISH(self.ohlc)
        ]

        ta = np.array(ta).transpose()
        ta[np.isnan(ta)] = 0
        ta[np.isinf(ta)] = 0

        # scale them to the same range
        self.scaler = StandardScaler()
        self.scaler.fit(ta)
        self.ta = self.scaler.transform(ta)