conor19w / Binance-Futures-Trading-Bot

A Technical Analysis Bot that trades leveraged USDT futures markets on Binance.
512 stars 173 forks source link

NameError: name 'np' and 'pd' is not defined #3

Closed Nai-mul closed 2 years ago

Nai-mul commented 2 years ago

Loading Price Data Symbols: ['SANDUSDT'] Start Balance: 1000 fee: 0.00036 15 min OHLC Candle Sticks from a period of 30 day Traceback (most recent call last): File "Bot.py", line 938, in prediction[j], signal1, Type[j] = TS.RSIStochEMA(prediction[j],CloseStream[j],HighStream[j],LowStream[j],signal1,CurrentPos[j]) File "/home/boss/conorbot/TradingStrats.py", line 402, in RSIStochEMA CloseS = pd.Series(CloseStream) NameError: name 'pd' is not defined

.......................................

Symbols: ['SANDUSDT'] Start Balance: 1000 fee: 0.00036 15 min OHLC Candle Sticks from a period of 7 day Traceback (most recent call last): File "Bot.py", line 939, in prediction[j],Type[j]=TS.tripleEMA(CloseStream[j],OpenStream[j],prediction[j]) File "/home/boss/conorbot/TradingStrats.py", line 353, in tripleEMA EMA3 = np.array(ema_indicator(pd.Series(CloseStream), window=5)) NameError: name 'np' is not defined

conor19w commented 2 years ago

Sorry the script was missing some imports look at it again now, pandas and numpy were not imported

Nai-mul commented 2 years ago

Hi,

i have installed all the essential requirements by pip install -r requirements.txt numpy==1.21.2 pandas==1.3.3 they are alreay install inside .env

conor19w commented 2 years ago

Yes TradingStrats.py was missing them as imports up the top hence the error, I've added them as imports to it now.