You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code should be written to get MACD Line and Signal line crossover to trigger signal.in back testing. i have tried the same but giving me IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
for line self.macd_line = macd['MACD_12_26_9']
self.signal_line = macd['MACDs_12_26_9']
my code is as follows:
import pandas as pd
import pandas_ta as ta
from backtesting import Backtest, Strategy
from backtesting.lib import crossover
The code should be written to get MACD Line and Signal line crossover to trigger signal.in back testing. i have tried the same but giving me IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indicesfor line self.macd_line = macd['MACD_12_26_9']
self.signal_line = macd['MACDs_12_26_9']
my code is as follows:
import pandas as pd
import pandas_ta as ta
from backtesting import Backtest, Strategy
from backtesting.lib import crossover
class EMA(Strategy):
def init(self):
The text was updated successfully, but these errors were encountered: