I'm Creating a BitMEX Automatic Stop Loss and Take Profit Bot

in #cryptocurrency5 years ago (edited)

bitmex_auto_sl_tp.png

It feels good to finally work on my open source projects. As I had promised one of the people interested in my bots about a month ago, I have redeemed my free time and am now actively developing my projects.

Due to increased interest in a sample script for a BitMEX Auto Stop Loss / Take Profit Bot I created earlier on this year, I have decided to create a full project to develop a similar bot that has more features and is not just a sample.

The sample was an example of how one could implement such a bot and I had written a tutorial on that subject here on Steemit.

What features did the sample have?

It was very basic. It scanned the configured BitMEX account for any open positions and if it found one (either short or long), it would place a stop loss and take profit order, according to percentages set.

Its shortcomings

  • It only handled one trading pair: XBTUSD
  • SL and TP orders were static, not dynamic. That is, they didn't change with changing price, or offer the option to have that
  • Error handling wasn't robust
  • No support for multiple BitMEX accounts

To make this new bot as useful and complete as I can, I will take all this into account, as well as feedback I received in the GitHub issues.

So what features will the new bot have?

Well, the project is still in pre-alpha. I will start with basic features first and put out a beta release, before moving on to add more advanced features.

Here are some of the features I had in mind:

  • Single account access, with potential to implement multiple account access later
  • 2 trading pairs to start with (XBTUSD and ETHUSD)
  • Automatic Stop Loss and Take Profit orders, with optional "trail" feature, for dynamic orders
  • More robust error handling

Are you interested in this bot's development? Do you have any features you would like to see implemented? Any suggestions? Leave a comment below.




You can find the code and installation instructions for this bot on GitHub.

Sort:  

Hey, @imwatsi!

I'm really interested in following this bots development. I slightly altered the sample code you provided in the tutorial (thanks, by the way!) so that the stop and profit targets are set point distances from entry, rather than percentages. It works great.

I'd love if you coded a trailing stop into the next release and the ability to have multiple profit targets.

I chart through ninjatrader and have a bitmex data feed connected to it. It's currently not possible to connect BitMEX accounts to ninjatrader, so your tp and sl code has greatly improved the efficiency of my exit orders and permits me to better focus on the price action.

Thanks again!

Hi @botanical54

I'm glad you find my script useful :)

Great feature suggestions! I will add multiple profit targets once I get the beta version out. Trailing stops will be part of the beta, so they will be ready first.

Thanks for your feedback and support.

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 58171.46
ETH 2472.55
USDT 1.00
SBD 2.42