imwatsi / crypto-market-samples

A collection of sample Python scripts that one can incorporate or build upon when developing customized systems for trading cryptocurrency
MIT License
22 stars 15 forks source link

Running alongside bitmex-market-maker #5

Open interzonez opened 4 years ago

interzonez commented 4 years ago

I'm running the Bitmex Market Maker script. Opening bids and asks, repositioning accordingly.

There is no SL or TP with that script.

I have enabled your script to run on SL only and it is watching for the first MM order. With a 15% SL.

How does your script deal with orders after the first one - and assuming the position has not been closed but added to? In Bitmex MM new orders are added to the first position, as MM works through bid and ask orders.

From my limited testing of your script (without MM running): after my second order filled, Bitmex SL total contracts remained at +1 contract instead of +2

I'm assuming a function would be needed to recalculate order 1 + order 2 / 2 = place new SL at 15% of the new total?