"Long equals short" algorithm for a calm market
ApitradeThe "Long equals short" algorithm in the "Hurricane" futures bot allows you to configure the bot in such a way that it automatically increases the long position (using a market order) if the sum of short positions has become a certain percentage more than long positions, or increases the short position if the sum of the long positions became greater than the short positions.
In order not to increase the position at a bad price, you can use the price limit and "automatically determine". This option can only be enabled for one long bot and one short bot.
It is also recommended to periodically close part of contracts or set up auto close feature in order to keep the size of the positions comfortable, because. the constant increase in positions can eventually lead to an increase in positions to an uncomfortable level.
It also makes sense to periodically close 100% of both long and short positions in order to reduce risks at the moment when the PNL of positions after a long trade is equal, and the margin balance, for example, is 10% more than the margin balance that was at the last opening of positions (manually or automatically using the "Auto close" function). This is due to the fact that after a long calm market there is usually a strong momentum, which is better to meet without a position.
Please note that position increase will not occur if:
1) the current price does not meet the limits you set
2) if there is not enough available margin balance on the exchange for this (this can happen when the market goes against your position and liquidation is approaching or if the chosen leverage on exchange is to low).