def get_relative_strength_idx(dataset_21):
    comparer = dataset_21[0]
    gain =0.0
    loss =0.0
    new_dataset= dataset_21[0:]
    for each in new_dataset:
        if comparer > each:
            gain = gain + (each-comparer)
        elif each < comparer:
            loss = loss + (comparer-each)
    if loss ==0.0:
        return 100.0
    elif gain ==0.0:
        return 0.0
    else:
        rs = (gain/len(new_dataset))/(loss/len(new_dataset))
        rsi = float(100 - (100/(1+rs)))
        return rsi
dataset/ETHPy150Open TheSriram/MLT4Trading/Project 3/testlearner.py/get_relative_strength_idx/swapped operands of `>`