The algorithm of the Fund’s bot

in #bitshares5 years ago

Today we will tell you about the trading algorithm of the new bot launched in January this year. The principle of its operation is based on the high volatility of cryptocurrencies: the sale part of the asset with the growth of the price, and the purchase of more when the price falls.

Let's look at a specific example.

Let's say we have 1 BTC at the price of 5000 bitUSD. The robot puts 10% of the available funds for sale at a price 10% higher than the current one. I.e. 0.1 BTC at a price of 5500 bitUSD. After this order is triggered, an order is placed for the purchase of 0.105 BTC (5% more than sold) at the price of 5000 bitUSD and a sell order is placed at the price 10% higher than the triggered order. That is 0.09 BTC (10% of the balance) at the price of 6050 bitUSD.

With further price growth and triggering sell orders, 2 orders will be placed in the same way: one for the purchase at a lower price and the other for the sale at a higher price. When the price falls and a buy order is triggered, the sell order is canceled and it’s placed lower, at a price 10% higher than the current purchase.

Thus, after the sale of 0.1 BTC at the price of 5500 bitUSD, we have orders to sell 0.09 BTC at the price of 6050 bitUSD and to buy 0.105 BTC at the price of 5000 bitUSD. And in the portfolio remains 25 bitUSD (550 from the sale minus 525 – purchase order) – this is the profit of the robot.

When purchasing 0.105 BTC, a sell order of 0.09 BTC is canceled and a sell order of 0.1005 BTC is placed at 5500 bitUSD.

With the constant growth of the rate, the order amount will gradually decrease:

PriceQuantityAmount
5500 bitUSD0,1 BTC550 bitUSD
6050 bitUSD0,09 BTC545,5 bitUSD
6655 bitUSD0,081 BTC539,055 bitUSD

therefore, the amount of the first order is taken as a constant, and, in the case of a sell order for a smaller amount (545.5 bitUSD at a price of 6050 bitUSD), a purchase order is placed at 7.5% (instead of 5%) of a larger amount of BTC – 0.09675 BTC. This reduces the profit from the sale, but thereby increases amount of BTC in the portfolio, which gradually increases the amount of the sell order even at a higher price.

If the rate of BTC takes significantly below 5000 bitUSD, the bidding robot completely stopped. Therefore, the robot is restarted at the current price level, but the constant of the minimum order remains the same – 550 bitUSD per order, and until this amount is reached, increased buy orders will be placed (+7.5% to the sold amount). Thus, trading volumes will decrease, but will not stop completely.

In the same way, this mechanism works for compensation of trade commissions.

P.S. the article gives an example with specific percentages, but in the real situation they can be different depending on the pair in which the trades are conducted.

Official channel in Telegram: @tre_fund
Chat for discussion: @tre_fund_support
Site TRE-FUND
Trading tokens on the exchange

Sort:  

Congratulations @tre-fund! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 10 upvotes. Your next target is to reach 50 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 64172.03
ETH 3144.93
USDT 1.00
SBD 3.85