There was a problem loading the comments.

Print

#### Related Articles

- 2021/02/11 12:15

Bot sells funds that are in your account on the exchange. In its work, the bot uses the API interface of exchanges to display orders according to the chosen algorithm and to track their execution.

Currently, there are two algorithms of the RevenueBot bot:

**Algorithm «LONG»**

The work of the bot takes place in cycles and is based on the principle of buy parts at the fall of the price (initial part of the cycle) and selling more all bought at the rise of the price (final part of the cycle). The idea is that having a certain deposit, the bot buys not for the whole amount at once, but in part when the price falls, using a predetermined**set of safety orders**.

The first purchase order in the grid is the closest to the current price and the smallest in volume. Each subsequent purchase order is volumetric (Martingale) and cheaper. Thus, when the price falls, the bot buys more and more, but at a lower price. This allows it to make a final profitable transaction, selling all purchased at a price much lower than the bot started to buy.

Once the orders have been placed on the stock exchange, the bot monitors their implementation. If the price falls, the first purchase order in the grid that was closest to the current price will be executed. After noticing this, the bot will put a profit-fixing order for sale on the exchange (the volume of the order will be the same as that of the just executed first order in the grid for the purchase, and in the price will be laid a profit).

The bot will continue to monitor the implementation of the orders on the exchange. If the price falls further, a second netted order will be executed. Having noticed this, the bot will cancel the current profit-fixing order for sale and will issue a new one, which will carry the volume of two completed purchase orders, its price will be lower than the price of the just cancelled sales order, but it will also have a profit.In this way, the algorithm will continue until the price rises and the profit-fixing order is executed.

It should be noted that as the price falls and the primary purchase orders are executed, the price of the profit-fixing sale order will also fall, which will make it possible in the end to sell everything purchased at a lower price than it started to buy. Also note that the profit-fixing order is always the same, it carries in itself the volume of all executed primary orders, and its price is the price of the purchased plus profit.

When a profit-fixing order is executed we end the cycle, the bot calculates everything and starts a new cycle of work. Profit comes in the second coin of the traded pair.

**Important: We do not recommend interfering with the bot’s work algorithm and performing any manual actions with the exchange orders that the bot created. Such interference will result in a bot error.**

**Consider in detail what the order grid for the LONG algorithm is and how it is calculated.**

A grid of orders is a table in which rows are the number of orders, and columns are the volume of the order and its price. The number of rows of a table is determined by the number of orders in the grid.

**How to calculate the prices of orders in the grid?**

**Orders in the grid are distributed over the entire overlap of the price change.**

The price distribution of orders in a grid can be linear (default) or logarithmic.

The linear distribution will give the price 95 90 85 80 75 70 65 60 55 50.

The logarithmic distribution gives the price 95 93 90 86 81 76 71 64 59 50.

As you can see from the logarithmic distribution, we get more orders near the current price.

**Important: The use of logarithmic pricing increases the risks of trade.**

Read in detail what the risks are when trading a bot.

**How do you calculate the amount of orders in a grid?**

The martingale system is used to calculate the volume of orders. The martingale system sets the percentage by which each subsequent order in the grid is larger than the previous one. The first order in the grid is the smallest in volume and the closest to the current price, each subsequent order is larger than the previous one by a specified percentage and further from the current price.This makes it possible to obtain a profit with a lower rebound price. The higher the percentage of Martingale, the lower the rebound price is needed to earn a profit.

**A simple example of how a bot works in a LONG algorithm with high volatility.**

For example, the bot trades the pair Y/X, the percentage of overlap of the price change 50%, the indentation of the first order 5%, the number of orders 10, martingale 5%, the deposit allocated to the bot 1000 coins "X", the desired profit 1%. The bot will buy parts "Y" for "X" when the price of "Y" falls, after which it will sell all purchased "Y" with the price of "Y" rising.

At the time of calculation of the order grid, the current price on the exchange of the purchased asset (coin "Y") is conditionally 100. Based on this price, the bot will calculate and submit to the exchange about such a grid of purchase orders:

1 order: volume 0.83, price 95

2 order: volume 0.92, price 90

3 order: volume 1.02, price 85

4 order: volume 1.15, price 80

5 order: volume 1.28, price 75

6 order: volume 1.44, price 70

7 order: volume 1.63, price 65

8 order: volume 1.85, price 60

9 order: volume 2.12, price 55

10 order: volume 2.46, price 50

As you can see, the first order is the closest to the current price on the exchange and the smallest in volume, every next volume and cheaper.

If the price falls to 50, all 10 purchase orders will be executed successively. In order to get a profit, it will be necessary to raise the price of "Y" to about 70 in order to get the desired profit of 1%. It’s much lower than we started buying "Y" at 95. Note that the higher the percentage of Martingale, the lower the price increase is needed after the fall to fix the profit, as most purchases will be at low prices. Profit will be made in coin "X".

**Algorithm «SHORT»**

The operating principle is mirrored by the LONG algorithm and is based on the principle of selling parts at a price increase (initial part of the cycle) and buying cheaper all sold at a price drop (final part of the cycle).

Read all the features of the bot algorithm in the description of the LONG algorithm. Only the differences between the SHORT algorithm and the LONG algorithm are described here.

The first order to sell in a grid is the closest to the current price and the smallest in volume. Each subsequent order is longer (the Martingale system is used) and more expensive. Thus, as the price increases, the bot sells more and more, but at a higher price. This makes it possible to make a final profitable transaction, having bought all sold at a price much higher than the bot began to sell.

After installing the netting, the bot tracks the orders issued and, if executed, issues a purchase order at a price lower than the ones sold.

In this algorithm of work, a profit bot can be obtained both in the second coin of the traded pair and in the first coin.

The profit in the first coin is suitable, for example, for those who hold promising altcoins for a long time and want to trade them to btc, increase the original deposit exactly in altcoin, rather than earn in btc.

**A simple example of how a bot works in a SHORT algorithm with high volatility.**

For example, the bot trades a pair Y/X, set a 50% overlap rate, 5% forfeit of the first order, 10% orders, 5% Martingale, a deposit allocated to the bot of 100 coins "Y", a desired profit of 1%. The bot will sell parts "Y" for "X" when the price of "Y" rises, after which it will buy all sold "Y" when the price of "Y" falls.

At the time of calculation of the order grid, the current price on the exchange of the asset being sold (coin "Y") is conditionally 100. Based on this price, the bot will calculate and submit to the exchange about such a grid of purchase orders:

1 order: volume 7.9, price 105

2 order: volume 8.3, price 110

3 order: volume 8.7, price 115

4 order: volume 9.2, price 120

5 order: volume 9.6, price 125

6 order: volume 10.1, price 130

7 order: volume 10.6, price 135

8 order: volume 11.1, price 140

9 order: volume 11.7, price 145

10 order: volume 12.3, price 15

As you can see, the first order is the closest to the current price on the exchange and the smallest in volume, each more volume and more expensive.

If the price rises to 150, all 10 sales orders will be executed successively. In order to get a profit, it will be necessary to wait for the subsequent fall of the price of "Y" to about 130 in order to get the desired profit 1%. That’s a lot more than we started selling "Y" at 105. Note that the higher the percentage of Martingale, the lower the price drop is needed after the increase to fix the profit, since the bulk of sales will be at high prices. Profit can be obtained in both "X" and "Y" coins.

Thus, the success of a trade is determined by indicators such as the number of orders in the grid, the difference in their weights, the distance between them, the departure of the first order, and how far from the current price the last order in the grid will stand.

All of these indicators are set in the**bot settings**. Details of each of the configurations are set out in the FAQ section on bot creation.

Currently, there are two algorithms of the RevenueBot bot:

The work of the bot takes place in cycles and is based on the principle of buy parts at the fall of the price (initial part of the cycle) and selling more all bought at the rise of the price (final part of the cycle). The idea is that having a certain deposit, the bot buys not for the whole amount at once, but in part when the price falls, using a predetermined

The first purchase order in the grid is the closest to the current price and the smallest in volume. Each subsequent purchase order is volumetric (Martingale) and cheaper. Thus, when the price falls, the bot buys more and more, but at a lower price. This allows it to make a final profitable transaction, selling all purchased at a price much lower than the bot started to buy.

Once the orders have been placed on the stock exchange, the bot monitors their implementation. If the price falls, the first purchase order in the grid that was closest to the current price will be executed. After noticing this, the bot will put a profit-fixing order for sale on the exchange (the volume of the order will be the same as that of the just executed first order in the grid for the purchase, and in the price will be laid a profit).

The bot will continue to monitor the implementation of the orders on the exchange. If the price falls further, a second netted order will be executed. Having noticed this, the bot will cancel the current profit-fixing order for sale and will issue a new one, which will carry the volume of two completed purchase orders, its price will be lower than the price of the just cancelled sales order, but it will also have a profit.In this way, the algorithm will continue until the price rises and the profit-fixing order is executed.

It should be noted that as the price falls and the primary purchase orders are executed, the price of the profit-fixing sale order will also fall, which will make it possible in the end to sell everything purchased at a lower price than it started to buy. Also note that the profit-fixing order is always the same, it carries in itself the volume of all executed primary orders, and its price is the price of the purchased plus profit.

When a profit-fixing order is executed we end the cycle, the bot calculates everything and starts a new cycle of work. Profit comes in the second coin of the traded pair.

A grid of orders is a table in which rows are the number of orders, and columns are the volume of the order and its price. The number of rows of a table is determined by the number of orders in the grid.

- The price of orders in the grid is calculated from the current price on the exchange.
- The price of the first order in the grid is set by setting "Indentation of the first order (%)" - indentation of the first order in % (by how much interest the price of the first order in the grid will be less than the current price).
- Set "Price change overlap (%)" - percentage of price change overlap sets how much the price change will be covered by the grid of orders. In essence, this setting sets how much of the current price will be defended by the last order in the grid.

The price distribution of orders in a grid can be linear (default) or logarithmic.

**The linear distribution**specifies the uniform distribution of prices over the whole price overlap (the same distance between prices over the whole price overlap).**The logarithmic distribution**gives a high density of orders near the current price on the exchange. This is done in order to attract more deposit to trade near the current price, as the main fluctuations occur exactly near the current price

The linear distribution will give the price 95 90 85 80 75 70 65 60 55 50.

The logarithmic distribution gives the price 95 93 90 86 81 76 71 64 59 50.

As you can see from the logarithmic distribution, we get more orders near the current price.

Read in detail what the risks are when trading a bot.

The martingale system is used to calculate the volume of orders. The martingale system sets the percentage by which each subsequent order in the grid is larger than the previous one. The first order in the grid is the smallest in volume and the closest to the current price, each subsequent order is larger than the previous one by a specified percentage and further from the current price.This makes it possible to obtain a profit with a lower rebound price. The higher the percentage of Martingale, the lower the rebound price is needed to earn a profit.

For example, the bot trades the pair Y/X, the percentage of overlap of the price change 50%, the indentation of the first order 5%, the number of orders 10, martingale 5%, the deposit allocated to the bot 1000 coins "X", the desired profit 1%. The bot will buy parts "Y" for "X" when the price of "Y" falls, after which it will sell all purchased "Y" with the price of "Y" rising.

At the time of calculation of the order grid, the current price on the exchange of the purchased asset (coin "Y") is conditionally 100. Based on this price, the bot will calculate and submit to the exchange about such a grid of purchase orders:

1 order: volume 0.83, price 95

2 order: volume 0.92, price 90

3 order: volume 1.02, price 85

4 order: volume 1.15, price 80

5 order: volume 1.28, price 75

6 order: volume 1.44, price 70

7 order: volume 1.63, price 65

8 order: volume 1.85, price 60

9 order: volume 2.12, price 55

10 order: volume 2.46, price 50

As you can see, the first order is the closest to the current price on the exchange and the smallest in volume, every next volume and cheaper.

If the price falls to 50, all 10 purchase orders will be executed successively. In order to get a profit, it will be necessary to raise the price of "Y" to about 70 in order to get the desired profit of 1%. It’s much lower than we started buying "Y" at 95. Note that the higher the percentage of Martingale, the lower the price increase is needed after the fall to fix the profit, as most purchases will be at low prices. Profit will be made in coin "X".

The operating principle is mirrored by the LONG algorithm and is based on the principle of selling parts at a price increase (initial part of the cycle) and buying cheaper all sold at a price drop (final part of the cycle).

Read all the features of the bot algorithm in the description of the LONG algorithm. Only the differences between the SHORT algorithm and the LONG algorithm are described here.

The first order to sell in a grid is the closest to the current price and the smallest in volume. Each subsequent order is longer (the Martingale system is used) and more expensive. Thus, as the price increases, the bot sells more and more, but at a higher price. This makes it possible to make a final profitable transaction, having bought all sold at a price much higher than the bot began to sell.

After installing the netting, the bot tracks the orders issued and, if executed, issues a purchase order at a price lower than the ones sold.

In this algorithm of work, a profit bot can be obtained both in the second coin of the traded pair and in the first coin.

The profit in the first coin is suitable, for example, for those who hold promising altcoins for a long time and want to trade them to btc, increase the original deposit exactly in altcoin, rather than earn in btc.

For example, the bot trades a pair Y/X, set a 50% overlap rate, 5% forfeit of the first order, 10% orders, 5% Martingale, a deposit allocated to the bot of 100 coins "Y", a desired profit of 1%. The bot will sell parts "Y" for "X" when the price of "Y" rises, after which it will buy all sold "Y" when the price of "Y" falls.

At the time of calculation of the order grid, the current price on the exchange of the asset being sold (coin "Y") is conditionally 100. Based on this price, the bot will calculate and submit to the exchange about such a grid of purchase orders:

1 order: volume 7.9, price 105

2 order: volume 8.3, price 110

3 order: volume 8.7, price 115

4 order: volume 9.2, price 120

5 order: volume 9.6, price 125

6 order: volume 10.1, price 130

7 order: volume 10.6, price 135

8 order: volume 11.1, price 140

9 order: volume 11.7, price 145

10 order: volume 12.3, price 15

As you can see, the first order is the closest to the current price on the exchange and the smallest in volume, each more volume and more expensive.

If the price rises to 150, all 10 sales orders will be executed successively. In order to get a profit, it will be necessary to wait for the subsequent fall of the price of "Y" to about 130 in order to get the desired profit 1%. That’s a lot more than we started selling "Y" at 105. Note that the higher the percentage of Martingale, the lower the price drop is needed after the increase to fix the profit, since the bulk of sales will be at high prices. Profit can be obtained in both "X" and "Y" coins.

Thus, the success of a trade is determined by indicators such as the number of orders in the grid, the difference in their weights, the distance between them, the departure of the first order, and how far from the current price the last order in the grid will stand.

All of these indicators are set in the

© RevenueBot