You didn't continue code, code: def signalgenerator(df): open = df.Open.iloc[-1] close =…
Jump to turn (8)
- 1You didn't continue code, code: def signalgenerator(df): open = df.Open.iloc[-1]
- 2I getting ERROR: File "c:\Users\Alan\.vscode\jewbot\jewbot\jewbot.py", line 19,
- 3But I getting ERROR in installation
- 4ERROR: WARNING: Requirement 'talib‑0.4.0‑cp39‑cp39‑winamd64.whl' looks like a fi
- 5How my code need to seem without talib ?
- 6I getting ERROR: BTC/USDT found in the market Traceback (most recent call last):
- 7What is ,its giveing me ERROR
- 8Can I wright my code without them ?
- User
You didn't continue code, code: def signal_generator(df): open = df.Open.iloc[-1] close = df.Close.iloc[-1] previous_open = df.Open.iloc[-2] previous_close = df.Close.iloc[-2]
Calculate EMA and MA indicators
ema_10 = talib.EMA(df[‘Close’], timeperiod=10) ema_50 = talib.EMA(df[‘Close’], timeperiod=50) ema_200 = talib.EMA(df[‘Close’], timeperiod=200) ma_20 = talib.SMA(df[‘Close’], timeperiod=20)
Identify Bullish/Bearish Candlestick Patterns
bullish_candles = talib.CDLDRAGONFLYDOJI(df[‘Open’], df[‘High’], df[‘Low’], df[‘Close’]) bearish_candles = talib.CDLHAMMER(df[‘Open’], df[‘High’], df[‘Low’], df[‘Close’])
- Assistant
Identify Trend
trend = "" if ema_10[-1] > ema_50[-1] and ema_50[-1] > ema_200[-1]: trend = "Bullish" elif ema_10[-1] < ema_50[-1] and ema_50[-1] < ema_200[-1]: trend = "Bearish" else: trend = "Sideways"