Git Product home page Git Product logo

bmcli's People

Contributors

darkerego avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bmcli's Issues

Autostop and lag issues

Great work with the library! Is it still in use/active development?
I found a couple bugs in today's testing, I'll list them below rather than opening multiple issues:

  1. Running commands in terminal, for example python3 ./bmcli.py -a 0.001 0.005 25, constantly reports lag errors as such:
    [+] bitmex is lagging 86399 second(s)
    [+] Websocket is lagging 86399 seconds.
    This is exactly 24h so I'm assuming that the ticker['timestamp'] is reporting set to 1 day in the future? I didn't do extensive testing yet, just commented everything below if self.lag >= 30: in bitmex_ws.py.

2.1) I'm running into some issues with the autostop function (great idea BTW). The trailing stop part seems to work fine, but the stop loss does not. More specifically, after running python3 ./bmcli.py -a 0.001 0.001 20 and the stop loss threshold being reached, this is the output:
[+] [ Params: 0.001|0.001 | 25.0] | [ High: 36924|Diff: 26.91399999999703 ]
[+] [ Unrealized PNL: -5e-08 | Realized PNL: -3.7e-07 | Balance: xxxxxxxx]
[+] [ 2021-01-16 15:29:08, Position: 1 | Entry Price: 36914.0 ]
[+] quote {'symbol': 'XBTUSD', 'id': 8796313950, 'side': 'Sell', 'size': 730214, 'price': 36860.5}
[!] Error: 'bid'
The script exits immediately after that and does not execute any sales.

2.2) The second, minor issue I observed with the autostop function is that the script doesn't terminate when autostop function successfully closes a position using the trailing stop and I need to use Ctrl+C combination to escape manually.

  1. The addition of SyBrain is interesting, but I've been running into the same problem as described here. However, seems this is an external and seemingly abandoned library this is just a minor comment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.