In this detailed post we will explain:
- The basic principles behind the algorithms for Long and Short bots
- How to apply the algorithm to multiple pairs
- The use of safety orders and their parameters (multiplier, step, etc)
- The 20 parameters or bot settings; what they mean and how they work
A bot is a trading algorithm that executes market orders on a crypto-exchange according to user-defined settings. Bots operate around the clock and are able to instantly respond to rapid changes in market conditions.
Principles of operation
Long Bots operate when prices rise according to the simple “Buy Low-Sell High” logic
Short Bots activate when prices fall. They are not actually “shorting”, but leverage the principle of selling a token at a high price and buy it back at a lower price. This way profits are secured while maintaining the initial amount of tokens.
Let’s further explore the Long and Short strategies- but first, let’s review 3 important FAQs:
1. By default, Long and Short bots increase the currency that is on the left, or the “Quote Currency”: BTC_ETH, BTC_XRP, BTC_NEO = BTC; USDT_ADA, USDT_EOS, USDT_LTC = USDT, and so on. This can be changed by selecting a different type of profit in the settings of the bot "Profit currency".
2. The Long algorithm requires funds in the first currency of the pair. BTC _ETH, BTC _ADA = BTC; ETH_XRP, ETH_ADA = ETH, and so on.
3. The Short algorithm requires funds in the second currency of the pair. BTC_ETH = ETH, BTC_ADA = ADA, ETH_XRP = XRP, and so on.
Let's go on an exciting adventure
The market is rising: the bot buys low and sells high.
This principle is as old as time: buy 1 coin for $10, sell the same coin for $11. The $1 profit is made on the price difference.
The Long Bot Strategy
Specify the conditions that the bot will start a deal: how many coins to buy and at what price- just like on an exchange. The bot buys tokens at your specified price point and sells them at a profit as the price moves up.
In the case of falling prices, Long Bots use safety orders. These are orders priced lower than the purchased price. The bot executes them in X% increments. When they are triggered, as you use more safety orders it averages down your Take Profit price and closes the deal without losing profit on the first rebound.
How the bot works:
1. Buys a token of your choice
2. Places an order for sale
3. Places safety orders for re-purchase below your initial buy price
4. If the safety orders have been triggered, updates the sell order. If necessary, sets up new safety orders.
5. After the deal closes, it waits for your trade start conditions to be met in order to start another deal.
How safety orders work with Long Bots - Example:
John has $1,000 and he wants to gain another $10. John believes that ETH will go up, and he runs a bot on it.
1. Let’s say that ETH trades at $500 - The bot will buy 0.2 ETH for $100
2. A sell order is set when the price reaches $550. Why? Because John aims to make a profit of $10. In his case, this is plus 10% of the purchase price. The price moves up 10% and John makes his $10.
3. There are 3 safety orders set in 10% increments below the original buy price. This means that the first safety order will be filled if the price goes below the purchase price by 10%, the second - if the price drops by 10%, and the third - if it falls another 10%. The purchase amount for each of these safety orders is $100.
Every time the price of ETH reaches $450, $405, and $364.5, the bot will purchase $100 worth of ETH:
- If the price of ETH dropped to $440. The safety order was triggered for $ 450 and the bot bought $100 / $450 = 0.2222 ETH. John had 0.2 ETH, and after the first SO was triggered, it was 0.2222 ETH more, and now he has 0.4222 ETH. They cost John $ 200. The average purchase price is $200 / 0.4222 ETH = $473.70. John still needs to make $10, but now it’s 5% of the $200 spent on the position. The TakeProfit order is removed from $550 and placed at + 5% of the average purchase price of $473.7. That is, the bot moves it lower, from $550 to $497.40- adjust because of the safety order the bot bought. If the price reaches $497.40, then it will be 0.4222 ETH * $497.4 = $210. John gets his $10.
- If the price continues to fall and reaches the next safety order, the bot will change its settings in the same way.
So each time the algorithm averages the purchase price and in the end, it will sell ETH on the first bounce upwards with the specified profit of $10.
The market is falling: the bot sells high and buys back low.
This is the opposite of the the Long algorithm: sell 1 coin for $10, buy 1 coin for $9. Profit made on the price difference: $1 plus your original coins.
How the Bot Works
- Determine how much of an accumulated token to sell
- Places buy order to buy back the token
- Set safety orders to sell (in case the coin suddenly begins to rise)
- If the safety orders have worked, update the purchase order. If necessary, set new safety orders.
- After the deal closes, it waits for your trade start conditions to be met in order to start another deal.
How safety orders work with the Short Bot - Example:
John has 1 ETH and expects the price to fall. He could hold but instead, he decides to use the Short Bot in a USD_ETH trading pair. What John sees:
1. The current price of ETH is $500, the bot sells 0.2 ETH at $100.
2. A safety order is placed to buy 0.2 ETH at $ 450. The logic is clear: the bot sold ETH for $100 and now will buy again at 10% cheaper for a $10 profit. 10% of $500 is $450. If this order is executed, the bot will buy 0.2 ETH for $ 90. John will have the same 1 ETH plus $10 profit. Selling 0.2 ETH saves John $100, and he spends $90 to buy it back: $100 - $90 = $10.
3. There are safety orders of 0.2 ETH each in 10% increments. That is, if the price stops falling and begins to move up, just like the long bot, the bot will update the take profit price as it takes on more safety orders. Safety orders go through $550, $605, and $665.5- all moving up in 10% increments. For example:
- If the price of ETH grows to $580, a safety order is triggered for $550 and another 0.2 ETH is sold for $110. Now we have sold 0.2 + 0.2 = 0.4 ETH and received $110 + $100 = $ 210.
But still, John wants to make $10 and get his 0.4 ETH back. To make John happy, his 0.4 ETH should cost $10 less than he paid for them: $210 - $10 = $200. So John needs 1 ETH for $200 / 0.4 = $500. The algorithm removes the purchase order (the price that will close the deal) from $450 to $500 for a total volume of 0.4 ETH. When the updated buy order is triggered, John’s return will be 0.4 ETH and will once again become the happy owner of 1 ETH, but now with an extra $10 in profit.
As the bot takes on more safety order, it averages the take profit price up. On the first bounce down it will buy the ETH, closing the deal and leaving John with a profit of $10.
Creating bots begins with a choice between simple and composite
What is the difference between a Simple bot and a Composite bot?
- Number of active trades: multiple simultaneous trades per bot vs one trade per bot
- How a bot uses funds
- Start conditions
- Easy management and statistics
1. The number of active transactions: Composite = Several trading pairs VS Simple = one trading pair
A simple bot can trade only one coin at a time. For example, a simple bot in a pair of BTC_LTC, as in the image below, will only trade this pair.
You can specify multiple pairs with a composite bot, and it will open many simultaneous deals or trades. Select the trading pairs as in the image below, for BTC_ETH, BTC_LTC, BTC_TNT. When the Trade Start conditions are met, the bot will begin a new deal. If the Trade Start condition is met for all trading pairs selected, then the maximum number of user-defined pairs will simultaneously start new deals. If only one trading pair’s Trade Start condition is met, then only that trading pair will start a new deal.
2. How a bot uses funds:
Bots require a certain amount of funds to be allocated and “blocked” so safety orders can be executed when needed. The Composite bot optimizes the fund utilization as it uses the allocated amounts across several pairs. A simple bot will have all allocated funds blocked until a buy signal triggers the order.
Simple bots operated independently, each requires funds, and adding more simple bots could create a shortage of trading funds.
For example, John chooses 10 pairs for bot trading. However, if all of John’s safety orders are used up, he might only have enough for 2 simultaneous bots to run. The trader does not know how to determine which coins will be the first to receive a buy signal - and most likely nobody knows. What can John do? He can create 10 simple bots, one for each pair. If the signals to buy all 5 coins arrive, all will be will be bought without any problems. But if prices begin to fall, safety orders may not be completed due to a lack of funds, which may end up in losses.
This example is one reason why we suggest using a composite bot. John chooses the same 10 pairs as he did with his individual Simple bots, but with his Composite bot, sets the maximum number of active deals to 2 - and the bot obediently buys the first two coins triggered by the trade start conditions. The bot algorithm will only open a new deal if one of the two open deals have already been completed. Since there will never be more than two, there will be no shortage of funds!
3. Start conditions:
Available for Simple bots only:
Manually - The user decides when to start the bot, hence the term, “manual.” After the bot closes an open deal, a new deal will not open until the user starts the bot again.
Open New Trade ASAP - the bot will begin a new deal immediately after closing an open one.
Available for Simple and Composite bots:
Buy- the bot will open a trade if the selected trading pair has a Buy signal from TradingView.
Strong Buy - works the same as “buy,” except that the signal must be "Strong Buy."
Strong Sell - works only for Short bots. Opposite conditions of Strong Buy.
Sell - works only for Short bots. Opposite conditions of Buy.
TradingView Custom Signal - the bot will trade according to your own strategies via TradingView indicators. Read more about Custom Signals here.
4. Ease of Management and Statistics
Composite bots are easier to manage and collect statistical information. For example, on the composite bot page you can:
- Close or cancel all active deals with one click
- See information on active and closed deals
- Edit the bot and change the parameters for all new deals and pairs
- Edit and reduce the number of simultaneously active transactions in the event of a shortage of funds
- Name - Name your bot to identify it in the list of active deals and other bots.
- Select an Exchange - The exchange which the bot will work on.
- Recommended Pairs - Coins with the most successful trades in the last 24 hours.
- Pair(s) - Select your trading pair(s). Remember:
- By default, the bots are set to take profit in Quote Currency, or the currency on the left: BTC_ETH, BTC_XRP, BTC_NEO = BTC, etc. To take profit in the currency on the right, choose Base Currency.
- In order to use the Long algorithm, make sure you have funds in the currency on the left, as indicated above.
- In order to use the Short algorithm, make sure you have funds in the currency on the right. BTC_ETH = ETH, BTC_ADA = ADA, ETH_XRP = XRP, and so on.
Composite bot specifics:
- You cannot select multiple pairs of the same token. For example, you cannot run a Composite bot with BTC_XRP, BTC_ADA, ETH_ADA and ETH_XRP pairs. If this is something you want to do, we advise creating composite bots for each Quote Currency (BTC, ETH, BNB, USDT, etc).
- Select the BTC_ALL button to add all of the available BTC trading pairs to the composite bot.
- The "Clear" button removes all pairs from the list.
5. Max active deals - available only in a composite bot
You can decide how many active deals a composite bot will have open at the same time. Keep in mind your balance as you add pairs and decide on Safety Trades and Max Active Deals. The Assistant window in the top right will help you decide on the best bot settings for your account size. The bot will automatically select the most promising pair at the moment (based on your trade start condition) and open a deal for it. After closing that deal, it will search for the next pair according to the same criteria and so on until you decide to stop it.
- Strategy - Select Long or Short bot.
- Profit currency - Which token do you want to profit in?
- If 'Quote Currency' is selected, the bot will profit in the left side of the pair: BTC_ETH, BTC_NEO = BTC; USDT_ADA, USDT_EOS = USDT, and so on.
- If 'Base Currency' is selected, the bot will profit in the right side of the pair: BTC_ETH = ETH; BTC_XRP = XRP; USDT_ADA = ADA, and so on.
- Base Trade Size - The initial amount used when starting a new deal.
- Safety Trade Size - The bot will buy more of the token at this amount as the price moves away from your original buy price. Remember: as you take on safety orders, you are averaging your take profit price closer to your original buy price.
- Target Profit (percentage) - Choose how much profit (in a percentage value) the bot will take from each deal.
- Take Profit Type - There are two options for this:
- Percentage from base trade
The bot will take profit based on the size of the initial order, regardless of the total volume of the transaction. For example, a transaction was opened with a volume of $100 and a target return of 5%, or $5. The price falls and the bot buys $90 more tokens. Now the total size the bot is trading is $1,000. Since the take profit is calculated from the base order, the take profit remains $5 (5% of $100), and not $50 = 5% of $1,000.
- Percentage from the total volume
The bot will take profit based on the total volume of the transaction. In the example above, the bot will adjust the take profit to account for the extra safety orders it has taken on in order to make a profit of 5% (5% of $1,000 = $50).
- Maximum safety trades count - The maximum number of safety orders (SO) that will be used for this bot.
- Max active safety trades count - The number of SOs the bot will put on the order book of the exchange.
Consider an example with 3 active SOs and a max active of 10 SOs. Once the bot starts, 3 SOs are placed on the order book and 7 remain on the sidelines (10 - 3 = 7). The price falls and 1 safety order is executed, the bot immediately puts a new one below the two already opened before, there are still 6 (7 - 1). Thus, while the price falls and SOs are executed, the bot continues to place more SOs, provided that the maximum quantity has not yet been reached. These two parameters can be specified the same so that all SOs will be immediately placed on the order book.
- Price deviation to open safety trades - The percentage at which the bot places SOs. For example, the bot opens a new deal at $100. 3 active SOs were placed on the order book in steps of 5%. This means the bot will place SOs at the following levels: $95, $90 and $85.
- Safety order volume scale - The volume of each sequential safety order will increase (or decrease) at this ratio.
Initial SO 0.1 BTC, SO Volume Scale is 2. The bot will place the SO according to the following logic:
- 0.1 BTC.
- The volume of the previous order is multiplied by the volume scale. 0.1 * 2 = 0.2 BTC.
- The volume of the previous order is multiplied by the volume scale. 0.2 * 2 = 0.4 BTC.
- 0.4 * 2 = 0.8 BTC
- 0.8 * 2 = 1.6 BTC
- And so on.
- Safety Order step scale - The space between SOs will increase (or decrease) at this ratio.
A bot was created with an initial step of 1% BTC and a multiplier of 2. It will place the SOs using the following logic:
- This is the first order and only a step is used to place it: 0 + -1% = -1%.
- The step of the previous order multiplied by the step scale ratio. The resulting step is added to the level of the last order. The last step was 1%, the new one will be 1% * 2 = 2%. The order will be placed: -1% + -2% = -3%.
- Step: 2% * 2 = 4%. Order: -3% + -4% = -7%.
- Step: 4% * 2 = 8%. Order: -7% + -8% = -15%.
- Step: 8% * 2 = 16%. Order: -15% + -16% = -31%.
- And so on.
- Don’t start trade with a 24h trading volume less than - This is useful for shitcoins with low trading volumes where signals might not be very reliable. The bot will start a deal only when the trading volume in the last 24 hours is higher than this value.
If you add BTC _*** pairs to a bot and enter a volume of 500 into the filter, then only coins with a volume of at least 500 BTC in a 24h period will be opened by the bot. Note that trading volume is always indicated in BTC. If a non-BTC-paired coin is selected, for example, ETH _ ***, then the bot is waiting for the equivalent BTC 24h trading volume condition to be met in order to start a new deal.
- Stop Loss - If the price falls below this user-prescribed amount, the bot will close the deal at a loss by selling the coin at market price. The Stop Loss value must be lower than the last safety order.
- Cooldown between deals (seconds) The bot will not open a new deal until the prescribed amount of seconds has passed. When using a composite bot, each deal has its own timer.
- Minimum price & Maximum price - The bot will not open a transaction if the price is below the minimum or above the maximum selected.
What we learned today:
- Long - use for rising prices
- Short - use for falling prices
- Safety orders allow for dollar-cost averaging (DCA). It is possible to move the TakeProfit price lower and close the deal without losing profit on the first rebound.
- 20 settings used to fine-tune and manage your bots
Increase your account by developing your skills with 3commas tools. Next time we will discuss more details about Long and Short bot settings, and much more! In the meantime, during your trial period, test out what you have learned today - and let the bots earn profits!
Please join our chat where you can ask for advice or share your experience with fellow traders at any time.
10% discount on promo code “USERNEW”
We wish you all the best!