There was a problem loading the comments.

Automatic flipping of the bot's algorithms

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

What is automatic algorithm flipping and what is it for?

Depending on certain conditions, the bot can stop the current active cycle, cancel all active orders, including take-profit, and then transfer the received work deposit to another bot (with the opposite algorithm) and run it.

An automatic flip of the bot algorithm can be useful in an aggressive strategy of trading reliable coins, and also to ensure that the bot deposit does not wait for the right price on the exchange. In addition, this mechanism is useful for reducing possible losses when the bot gets into the "Investor" situation, when all orders of the grid are executed and the price continues to move away from the price of the take profit order.

Example of using the automatic flipping algorithm

Consider the original BTC deposit and the ETH-BTC trading pair with the LONG algorithm (ETH will be purchased for BTC if ETH falls). ETH is a large and reliable coin with large capitalization, trading volumes, etc. Based on this, it can be assumed that having an initial deposit in BTC, it is not frightening if it is traded in the LONG algorithm temporarily to ETH. Therefore, for such a trading pair it is possible to set very aggressive trading settings (small percentage overlap of price change) to get more profit. However, aggressive trading settings can lead to the execution of all grid orders. In this case it is possible to automatically flip the algorithm to the other side in order not to wait for the return of the price and the deposit was not idle, and the trading continued and earned profit. This means that the LONG bot in the pair ETH-BTC must be stopped, the deposit from its work is transferred to the SHORT bot in the same trading pair (ETH will be sold for BTC when the price of ETH increases). In this situation, it is important to set less aggressive settings for the new bot when flipping the algorithm, which will allow you to stay in the black if all the grid orders are executed again.

How do I enable automatic flipping of the algorithm, what do I need to do?

To reverse the algorithm, you need to create a bundle of two bots. The bundle consists of the primary bot that will work initially, as well as the bot that is assigned to it for flipping. First one bot works, then another. Both bots must be created for the same exchange and trading pair. Bot algorithms must be the opposite.

The wallet of the primary bot must match the initial deposit in the account on the exchange.

The wallet of the bot for flipping can be created with a zero balance, its amount will be automatically assigned when the flipping mechanism is triggered. By default, the amount of the bot's wallet for flipping consists of the deposit received from the executed orders of the primary bot, to which is added the deposit remaining in the flipped bot during the previous flip of the algorithm, if there was one. The wallet of the bot for flipping can be formed without taking into account the deposit remaining in the flipped bot during the previous flip of the algorithm. You can set this up, read more about it below in the conditions and settings of the automatic flip of the algorithm.

Important: Bot wallets that have automatic algorithm switching enabled should not be interest-bearing. You need to use only those wallets where a specific amount is specified.

Note that in the settings of the bot that is assigned to flip, you can also assign your own bot to flip and it can be the primary bot. In this way, you can create a flip in a circle between two bots, or create chains of bots to flip the algorithm. To enable automatic flipping of the algorithm, you need to activate the checkbox "Enable automatic flipping of the algorithm" in the bot settings and select the bot that will be launched when the flipping mechanism is triggered.

Important: You only need to run the primary bot, the flipped bot will be launched automatically after the primary bot is stopped.

Important: Simulation mode is not available for bots with automatic algorithm flipping.

What are the conditions and settings for triggering automatic flipping of the algorithm and how to set them?

By default, the automatic flipping of the bot algorithm is triggered when all grid orders are executed, but you can also set other conditions for this mechanism to be triggered.

  • 1. All the grid orders were executed and the price continued to fall from the price of the last order on the specified percentage.
    In this case the follow-up of the price change begins after all the grid orders have been executed.
    • In the case of the original LONG algorithm if the whole grid of insurance orders is executed and the price has continued to decrease from the price of the last order in the grid for the required percentage then cancel the take-profit order of the current cycle, then we transfer the remaining deposit from this order to the designated SHORT Flip Bot and launch it. Trade will continue in the opposite direction.
    • In the case of the original SHORT algorithm, if the entire grid of safety orders is executed and the price continues to increase from the price of the last order in the grid by the desired percentage, then we cancel the take profit order of the current cycle, after which we transfer the remaining deposit from this order to the LONG bot designated for flipping and launch it. Trade will continue in the opposite direction.

      This condition for the automatic flipping of the algorithm is set in the bot settings, namely in the bot start filters. The name of the filter for starting the bot "Flipping the algorithm: Last order executed & % Price change".
  • 2. The price has changed by the specified percentage of the price of the first order in the grid.
    In this case, it doesn’t matter how many orders are executed. When the current price is removed by the desired percentage from the price of the first order in the grid, all active orders in the cycle will be canceled, and the algorithm will be reversed.
    • In the case of the original LONG algorithm, if the price has decreased from the price of the first grid order by the desired percentage, then cancel all active orders of the current cycle, including the take profit order, and then transfer the remaining deposit from this order to the SHORT bot designated for flipping and launch it. Trade will continue in the opposite direction.
    • In the case of the original SHORT algorithm, if the price increased from the price of the first grid order by the desired percentage, then cancel all active orders of the current cycle, including the take profit order, and then transfer the remaining deposit from this order to the LONG bot designated for flipping and launch it. Trade will continue in the opposite direction.

      This condition for the automatic flipping of the algorithm is set in the bot settings, namely in the bot start filters. Name of the filter to start the bot "Flip the algorithm: % price change".
  • 3. The bot cycle lasts longer than the specified time.
    You can set the time (in hours) after which, if there are completed orders in the active cycle of the bot and a take profit order is placed, the algorithm will be reversed. The time is calculated from the start of the cycle.

    This condition for the automatic flipping of the algorithm is set in the bot settings, namely in the bot start filters.The name of the starting filter of the bot "Inverting the algorithm: Cycle duration in hours".
  • 4. The cycle of the bot after placing a fixing order (take profit) lasts longer than the specified time.
    You can set the time (in hours) after which, if there are completed orders in the active cycle of the bot and a take profit order is placed, the algorithm will be reversed. The time is calculated from the moment of placing a fixing order (take profit).

    This condition for the automatic flipping of the algorithm is set in the bot settings, namely in the bot start filters. The name of the starting filter of the bot "Inverting the algorithm: Cycle duration in hours from fixing order".
  • 5. Setting up the formation of the bot's wallet for flipping.
    When the algorithm is reversed, the sum of the purse of the flipped bot is calculated. By default it consists of a deposit received from executed orders of the primary bot, to which is added the deposit left by the flipped bot in the previous flip of the algorithm, if there was one. If this filter is enabled, the deposit left by the flip bot during the previous flip of the algorithm will not be counted in these calculations. To enable this filter, set it to = 1.

    This condition for the automatic flipping of the algorithm is set in the bot settings, namely in the bot start filters. The name of the filter to start the bot "Flip the algorithm: Do not use the deposit balance from the previous flip".

Share via

Related Articles

© RevenueBot