alpacahq / alpacahq/alpaca-backtrader-api
timeframe=bt.TimeFrame.Minutes and sleep 3 seconds
- Vorherrschende Sprache
- Python
- Sterne
- 702
- Forks
- 160
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
New environment, pip freeze:
```
alpaca-backtrader-api==0.10.1
alpaca-trade-api==0.50.1
backtrader==1.9.76.123
certifi==2020.6.20
chardet==3.0.4
cycler==0.10.0
idna==2.10
kiwisolver==1.2.0
matplotlib==3.3.2
numpy==1.19.2
pandas==1.1.3
Pillow==7.2.0
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2020.1
requests==2.24.0
six==1.15.0
toolz==0.11.1
trading-calendars==1.11.11
urllib3==1.25.10
websocket-client==0.57.0
websockets==8.1
```
Trying to use this sample code https://github.com/alpacahq/alpaca-backtrader-api/blob/master/sample/strategy_sma_crossover.py, but with one difference, instead of bt.TimeFrame.Days I am trying bt.TimeFrame.Minutes:
```
data0 = DataFactory(dataname=symbol,
historical=False,
timeframe=bt.TimeFrame.Minutes,
backfill_start=True,
)
```
And looks like forever logging:
```
Starting Portfolio Value: 99920.71
***** DATA NOTIF: DELAYED
2020-10-08 10:55:41,651 connected to: wss://paper-api.alpaca.markets/stream
2020-10-08 10:55:42,294 connected to: wss://data.alpaca.markets/stream
2020-10-08 10:56:39,196 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:56:47,027 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:56:55,404 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:03,546 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:13,243 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:22,087 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:29,888 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:39,282 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:47,317 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:57:55,757 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:04,196 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:04,489 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:14,343 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:22,433 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:31,479 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
2020-10-08 10:58:39,858 sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)...
```
What I am doing wrong?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.