def relative_strength(prices, n=14):

    deltas = np.diff(prices)
    seed = deltas[:n + 1]
    up = seed[seed >= 0].sum() / n
    down = -seed[seed < 0].sum() / n
    rs = up / down
    rsi = np.zeros_like(prices)
    rsi[:n] = 100. - 100. / (1. + rs)

    for i in range(n, len(prices)):
        delta = deltas[i - 1]  # cause the diff is 1 shorter

        if delta > 0:
            upval = delta
            downval = 0.
        else:
            upval = 0.
            downval = -delta

        up = (up * (n - 1) + upval) / n
        down = (down * (n - 1) + downval) / n

        rs = up / down
        rsi[i] = 100. - 100. / (1. + rs)

    return rsi
Find the loader for the specified module.
dataset/ETHPy150Open jmelett/pyFxTrader/trader/utils/indicators.py/relative_strength--crossover with--dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/importlib/__init__.py/find_loader