Skip to main content
All CollectionsTrading Errors
Handle opposite market moves with safety orders
Handle opposite market moves with safety orders

Prepare the bot to withstand negative price moves.

Updated over 9 months ago

Assume wrong, and a bad trade comes

Neither algorithms nor traders can predict price moves. You can assume.
You can boost odds to be right with technical analysis, news, the mood in a chat, or even your feelings. 

Even pros can fail

It's not about how to avoid mistakes, but how to treat them, fix them. You consider how to handle wrong trades, and it's fine to do this manually every time. But what to do when a trade goes the wrong way at night? When you have hundreds of trades every day?

Let's make a deal with +1% profit

Here you buy 1 coin at $10000. The take profit order is at $10100.

But the price...

And still:

A drop, a bounce, but how does it matter when you can't sell? You stuck with a loss.

Move entry price closer to the current one

Buy more and more while the price drops. That's a part of a Martingale strategy. That's true you need more funds to average the entry price. But when it's closer to the current level, you can move the exit point closer too!

Remake the deal with two more buys

Now you also buy 1 more coin when the price drops to $9800.

You have 2 ccoins and spent $10000 + $9800 = $19800.  
When you buy more than once, you should calculate the average entry price.
Divide spent by got: $19800 / 2 = $9900.  
Move the sell order to $10000 without losing the 1% profit.

Price drops to $9600, and you again buy 1 more coin.

You have 3 coins and spent $10000 + $9800 + $9600 = $29400.  
The average entry price is $29400 / 3 = $9800.
You move the sell order to $9900 without losing the desired profit.

You turned the loss to profit on the same price move!

Feels good. Doesn't it?
These two buys are safety orders. You use them to average price to close the deal faster. And the bot can handle them automatically for you.

While they help, they also use funds

Safety orders are not ideal:

  • The bigger the deal is, the more you need to affect the entry price. You can't help a position with $10000 by investing $1 more.

  • When you add more funds, you increase not only potential profits but losses too. There's a chance the price won't bounce before you're out of funds. You can end up with a bigger loss than you had before adding safeties.

It's time to create your second bot on Demo account

Create a simple bot:

  • Name it as "My Safety bot."

  • Set pair to USDT_BTC.

  • Set the base order size to 100 USDT.

  • Set the safety order size to 100 USDT.

  • Set the deal start condition to "Open new trade asap".

  • Set the target profit to 0.1%.

Safety order size

It's how much the bot buys with a safety order.
Your bot is going to add 100 USDT to the deal with every safety.

You shouldn't set it lower than the base order. The smaller the safety order is, the less it affects the average entry price. Make it equal to the base order. Or bigger. That's how the Martingale strategy works - every next Safety order moves the Average price towards the negative market direction and thus makes the Take profit price move closer to the current price, which raises the chances of profitable trade.

Safety orders come with five settings

But for now, you need only two:

  • Max safety orders count

  • Price deviation to open safety orders (% from initial order)

Max safety orders count

How many times the bot can make additional buys. Twenty means the bot can make up to 20 safety buys.
The example trade had two safety orders:

Configure your bot to use up to 9 additional buys. With the base order, the bot can buy up to 10 times and use up to 1000 USDT.

Price deviation to open safety orders

It's the X% step between safety orders:

  • The bot places the first safety X% below the entry.

  • It places the second safety X% below the first one.

  • Every next safety is X% below the previous one.

The example trade had a 2% deviation:

  • The first safety is 2% below the initial buy $10000, at $9800.

  • The following safety is 2% below the previous $9800, at $9600.

Set it to 0.5%.

Create the bot, and start it right away

Now check the deal the bot just opened.
This article shows where you can check active deals.

Deals with safeties look differently

There's valuable information to track safety orders. 

The safety order price and fill status:

The fill status shows if there's a partial fill. Partial fills happen mainly with large orders. It's a bit advanced topic, don't worry if you don't know about this yet.

The breakdown

SO means safety order; remember this. You'll see and use it a lot.

  • You see how many safeties the bot has used. Completed means the bot already bought additional coins.

  • An active safety order is waiting for the price to reach its level. The bot hasn't bought coins yet, but it intends to.

  • Max means how many safeties the bot can place in total. Sum completed with active to see if the bot can put more.

You're awesome! You read till the end!

It's a long article. Now you know not only how to use safeties with bots, but another trading strategy! Safety orders are about averaging, DCA, which stands for Dollar-Cost Averaging. They're about the same thing.

What's next?

Did this answer your question?