INNER CODE UNIT · Python

di_minus

aticio/legitindicators · legitindicators.py:256

            di_minus = smoothed_directional_movement_minus[i] / smoothed_true_range[i] * 100
            dxi.append(abs(di_plus - di_minus) / (di_plus + di_minus) * 100)

            szladxi.append(dxi[i] + (dxi[i] - dxi[i-round(lag)]))

    ssf = super_smoother(szladxi, 10)
    return ssf


def true_range(data):
    """True range

    :param data: list of ohlc data [open, high, low, close]
    :type data: list
    :return: true range of given data
    :rtype: list
    """
    trng = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…