alpacahq / alpacahq/Momentum-Trading-Example

TypeError: 'int' object is not subscriptable

Abierto
#17 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
714
Forks
221
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I get this error as soon as the script attempts to buy or sell any stock. Not sure why, as the code I added and the code I modified all look fine to me.

```
Watching 167 symbols.
Task exception was never retrieved
future: exception=TypeError("'int' object is not subscriptable")>
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\alpaca_trade_api\polygon\streamconn.py", line 103, in _consume_msg
await self._dispatch(data)
File "C:\Python38\lib\site-packages\alpaca_trade_api\polygon\streamconn.py", line 240, in _dispatch
await handler(self, channel, ent)
File "momentum.py", line 251, in handle_second_bar
if (daily_pct_change > .04 and data.close > high_15m and volume_today[symbol] > 30000):
TypeError: 'int' object is not subscriptable
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.