## It helps to average the price at any moment

The **Add Funds** button allows the manual addition of safety orders to the deal. It helps to get more control over the deal, especially when it is at a significant drop.

### Some possible uses:

If you want manually control safety orders and price averaging, you can set maximum safety orders in the bot settings to zero. Then the only way to add safeties and average the price would be the

**Add Funds**feature.When a deal reaches maximum safeties while the price continues to move against the deal direction, you can add some funds to let the bot move the take profit order closer to the current price.

Next safety order still not reached, but the price seems to reverse and move in the profitable direction. You can add some funds if you think the take profit order is far away and the price would not reach it.

When the price reverses in a profitable direction, you can add some fund to let the bot close the deal faster (a very rare situation, but sometimes really helpful).

It is a mighty instrument when used correctly. But a possible use without any analysis may lead to even more losses. Be careful when using it.

## Available for each active deal

Clicking the button brings up the settings window.

**Volume**slider changes the size of the safety relative to all available amount of the currency on the exchange balance. May be manually entered the exact amount, changed with a slider, or input the % of the balance.**Available amount**displays how many coins you have available on the exchange.**Price**lets select order type between**Market**and**Limit**and specify the price for the**Limit order**when it is active.**Total quote currency**displays how much of quote currency will be added.**Total base currency**shows how much of base currency will be purchased.

## Use a Market order to add funds instantly

When a **Market** order is active, the bot will use funds a moment after you click the **Save** button. It will buy coins for a long deal and sell for a short one.

To do this, you should do three steps:

Click on the

**Add Funds**button.Adjust the volume either by typing the amount or the percentage or using the slider.

Press the

**Save**button.

After this, the bot will use the specified amount of funds to buy/sell the base currency and, thus, move the Take Profit (TP) order. You will notice that the TP price has changed.

## Use a Limit order to add funds on a specified price

When a **Limit** order is active, the bot will use funds to place the limit order on the exchange order book after you click the **Save** button. It will place a limit buy order for a long deal and a limit sell order for a short one.

To do this, you should do five steps:

Click on the

**Add Funds**button.Adjust the volume either by typing the amount or the percentage or using the slider.

Select

**Limit order**.Enter the price for the order.

Please note, that if you enter a price higher than the current one, it will be executed instantly like the market one.Press the

**Save**button.

The bot will place the limit order after this.

## How to cancel an active limit order?

1. When you want to cancel an order placed by **Add Funds** feature, you should go to order history of the deal. It opens after clicking on the deal ID:

The page displays a full history of orders for the deal.

To cancel an active limit order, click on the **Cancel** button near it:

## How to calculate the new price for the Take Profit order?

**Warning:** this calculation is only approximate. The real price can differ by up to 1%.

While the bot itself does a more complicated calculation, it's possible to use simplified formulas to calculate an approximate new average entry and take profit order price. Please note that exchanges have limits for order sizes, price steps and this could affect calculations, especially on cheap coins.

To begin, you should have four next numbers:

The current trade total volume,

.`total_volume`

The current trade total coins amount,

.`total_amount`

A volume you will add,

.`add_volume`

The total amount you will add,

.`add_amount`

Each active deal displays first two numbers in the **Volume** row. The total volume specified in main currency, on the image below that is ETH. The total amount in the alternative currency, VET in this case.

You specify the volume that you will add. The amount you add is calculated using the formula below:

add_amount = add_volume / add_price

Where add_price stands for the price you would buy or sell, adding volume.

Let us say we want to add 0.04270959 ETH to the long deal from the image above. We use a market order to do this so that we can calculate the price only approximately. To figure it, we check the exchange order book and find the first sell orders with enough volume and its cost of 0.00006165 ETH. That is a fundamental approach and market price order calculation a lot harder. It's a topic for another article so that we assume our price is 0.00006165 ETH.

We can calculate approximate add_amount now.

add_amount = add_volume / add_price = 0.04270959 / 0.00006165 = 692.77

If you don't know add_volume but know add_amount, you can find add_volume by the next formula.

add_volume = add_amount * add_price

Now you should find new numbers.

The resulting total volume, new_total_volume. It is the total volume of the deal after you add funds.

new_total_volume = total_volume + add_volume

The resulting total amount, new_total_amount. It is the total coins amount of the deal after you add funds.

new_total_amount = total_amount + add_amount

For our example deal that it as following.

new_total_volume = total_volume + add_volume = 0.04025861 + 0.04270959 = 0.0829682

new_total_amount = total_amount + add_amount = 641 + 692.77 = 1333.77

The next steps differ depending on the take profit type and algorithm the deal has. You need to find a new take profit order volume. To do this, you need to calculate your deal profit first.

For deals with the take profit type "Percentage from base trade".

needed_profit = take_profit_percent percent of base_order

or

needed_profit = base_order * (take_profit_percent / 100)

Where take_profit_percent is the deal take profit percentage; base_order is the deal base order size in the primary currency. If your base order specified in alternative coins, you can find base order size in the history of the deal orders which open by clicking on the deal ID.

For deals with the take profit type "Percentage from total volume".

needed_profit = take_profit_percent percent of new_total_volume

or

needed_profit = new_total_volume * (take_profit_percent / 100)

The deal from example has the "Percentage from base trade" take profit type and base_order 0.01 ETH.

needed_profit = base_order * (take_profit_percent / 100) == 0.01 * (0.4 / 100) = 0.00004

Now we can calculate the volume of new take profit order.

For long deals with profit in the quote (main) currency and short deals with profit in the base (alt) currency.

exchange_fee_total = (new_total_volume + needed_profit) * (fee_percent / 100)

new_take_profit_volume = new_total_volume + needed_profit + exchange_fee_total

For short deals with profit in the quote currency and long deals with profit in the base currency.

exchange_fee_total = (new_total_volume - needed_profit) * (fee_percent / 100)

new_take_profit_volume = new_total_volume - needed_profit + exchange_fee_total

Continuing with our long deal that has profit in the quote currency.

exchange_fee_total = (new_total_volume + needed_profit) * (fee_percent / 100) == (0.0829682 + 0.00004) * (0.2 / 100) = 0.0001660164new_take_profit_volume = new_total_volume + needed_profit + exchange_fee_total = = 0.0829682 + 0.00004 + 0.0001660164 = 0.0831742164

Finally, it is possible to calculate a new take profit price.

new_take_proft_price = new_take_profit_volume / new_total_amount

And for the example's deal.

new_take_proft_price = new_take_profit_volume / new_total_amount = = 0.0831742164 / 1333.77 = 0.00006236023

Checking the GIF from the begging of the article, where the example deal was taken from, the result differs from real new price 0.00006232 for 0.065%.

Recap of all formulas for convenient use.

add_amount = add_volume / add_price // when you know volume

add_volume = add_amount * add_price // when you know amount

new_total_volume = total_volume + add_volume

new_total_amount = total_amount + add_amount

needed_profit = base_order * (take_profit_percent / 100) //Percentage from base trade

needed_profit = new_total_volume * (take_profit_percent / 100) //Percentage from total volume

//Long deals with profit in the quote (main) currency and short deals with profit in the base (alt) currency

exchange_fee_total = (new_total_volume + needed_profit) * (fee_percent / 100)

new_take_profit_volume = new_total_volume + needed_profit + exchange_fee_total

//Short deals with profit in the quote currency and long deals with profit in the base currency

exchange_fee_total = (new_total_volume - needed_profit) * (fee_percent / 100)

new_take_profit_volume = new_total_volume - needed_profit + exchange_fee_total

new_take_proft_price = new_take_profit_volume / new_total_amount