Code:
def macd(prices):
print "Running MACD"
prices = np.asarray(prices)
print prices
macd, macdsignal, macdhist = MACD(prices, fastperiod=12, slowperiod=26, signalperiod=9)
print "MACD "+macd
Explanation:
Im trying to run some analysis on a Python list containing closing prices.
I understand that I must convert the list before handing it over to TA-Lib, since I have seen all examples doing that.
However this is met by a only length-1 arrays can be converted to Python scalars