whittlem / pycryptobot

Python Crypto Bot (PyCryptoBot)
Apache License 2.0
1.96k stars 736 forks source link

Simulation Error at Test Buy #723

Closed wmespi closed 1 year ago

wmespi commented 1 year ago

Simulation Error at Test Buy

Hi,

I was wondering if anyone has run into this issue when running the simulation. I have not been able to pinpoint what it is in my config that would be causing the problem. I will attach that below as well.

Issue only seems to trigger when there is a test buy order executed.

William

image

{ "coinbasepro": { "api_url": "https://api.pro.coinbase.com", "config": { "base_currency": "ALGO", "quote_currency": "USD", "live": 0, "smartswitch": 1, "verbose": 1, "statdetail": 1, "sim": "fast" }, "api_key_file": "coinbase.key" } }

Originally posted by @wmespi in https://github.com/whittlem/pycryptobot/discussions/722

phdd commented 1 year ago

Same for me

{
    "binance": {
        "api_url": "https://api.binance.com",
        "api_key_file": "binance.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "USDT",
            "live" : 0,
            "verbose": 1
        }
    }
}
btcusdt  | ================================================================================
btcusdt  | |          Iteration : 496 (BULL)                                              |
btcusdt  | |          Timestamp : 2022-11-25 23:00:00                                     |
btcusdt  | --------------------------------------------------------------------------------
btcusdt  | |              Close : 16522.1400                                              |
btcusdt  | |              EMA12 : 16510.7412                                              |
btcusdt  | |              EMA26 : 16510.6091                                              |
btcusdt  | |     Crossing Above : True                                                    |
btcusdt  | |    Currently Above : True                                                    |
btcusdt  | |     Crossing Below : False                                                   |
btcusdt  | |    Currently Below : False                                                   |
btcusdt  | |          Condition : EMA12 is currently crossing above EMA26                 |
btcusdt  | |              SMA20 : 16484.2275                                              |
btcusdt  | |             SMA200 : 16452.6191                                              |
btcusdt  | --------------------------------------------------------------------------------
btcusdt  | |               MACD : 0.1321                                                  |
btcusdt  | |             Signal : -5.6097                                                 |
btcusdt  | |    Currently Above : True                                                    |
btcusdt  | |    Currently Below : False                                                   |
btcusdt  | |          Condition : MACD is currently above Signal and has crossed over     |
btcusdt  | --------------------------------------------------------------------------------
btcusdt  | |             Action : BUY                                                     |
btcusdt  | ================================================================================
btcusdt  | --------------------------------------------------------------------------------
btcusdt  | |                       *** Executing TEST Buy Order ***                       |
btcusdt  | --------------------------------------------------------------------------------
btcusdt  | ValueError('index cannot be a set')
btcusdt exited with code 0
whittlem commented 1 year ago

A new major version was released this year. Please upgrade to v7.0.34 or later and if you are still having a problem, raise an issue.