Bybit-Bot
Bybit-Bot copied to clipboard
Make quantity based on equity
Currently market_qty is a static value which does not change.
It would be better, that market_qty could be set as a percentage of the equity (optional).
Example: Fixed value:
# AMOUNT IN USD TO BE TRADEDED ON EACH LIQUIDATION EVENT
market_qty = 8
Percentage value:
# AMOUNT IN USD TO BE TRADEDED ON EACH LIQUIDATION EVENT
market_qty = 0.05%
By this it could be achieved, that not only equity increases, but also order size and hence helps to increase equity even faster.
I want to implement this however this varies so much based on leverage, depending on what you select it will vary. Any ideas on how to solve this easily?
If you can read the leverage set on the Bybit website via API, this could be taken into the calculations.
If you can not read the leverage from the Bybit website, you could add a variable to the settings file, the user has to set. Ofc it should be the same value as set on the Bybit website.