Mar-11-2021, 04:35 PM
What is value? What is trend?
I would modify the code to do this:
I would modify the code to do this:
def arrow(trend, close): print('arrow', trend) signal = [] for date, value in close.iteritems(): print('value', value) if value > trend: signal.append(value*1.05) else: signal.append(np.nan) return signalEither trend or value will print out as a list or tuple. Once you know which, you can modify your code to get two numbers you can compare.