# Averaging (DCA)

## Averaging order settings

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/805f337b-3e7c-402a-9246-d2729eb39ea7/image.png" alt="" width="563"><figcaption></figcaption></figure>

In a <mark style="color:green;">**LONG**</mark> positions, averaging is activated by a <mark style="color:green;">**buy ↑**</mark> signal., for example:

```
{
  "name": "Hook 196",
  "secret": "2ehiexig0r5",
  "side": "buy",
  "symbol": "{{ticker}}"
}
```

In a <mark style="color:red;">**SHORT**</mark> positions, averaging is activated by a <mark style="color:red;">**sell↓**</mark> signal, for example:

```
{
  "name": "Hook 196",
  "secret": "2ehiexig0r5",
  "side": "sell",
  "symbol": "{{ticker}}"
}
```

### 1. Enabled/ Disabled

If enabled, averaging order or order grid will be created upon signal reception.

### 2. Single order / grid order

Learn more about grid parameters:

{% content-ref url="broken-reference" %}
[Broken link](https://docs.finandy.com/algo-trading/signals-tradingview/interface/broken-reference)
{% endcontent-ref %}

### 3. Real / virtual order

A real order is placed on the exchange.

A [virtual order](https://docs.finandy.com/trading/create-order-grid/order-types/virtual-order) is created in terminal and only sent to the exchange when activation conditions are met.

### 4. Order Amount / Volume

<figure><img src="https://554260309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeAkMGtCw51BYWLVdmuDx%2Fuploads%2Fak5UDiFYR5jfzEUNgTOj%2Fimage.png?alt=media&#x26;token=61dac46b-f923-49be-925d-80dd6066d3d8" alt="" width="563"><figcaption></figcaption></figure>

* **Amount**\
  Specify the token quantity (contracts) for the created order in the right-hand field.

  For example, if you enter <mark style="color:green;">**100**</mark> for **XRPUSDT**, an order for <mark style="color:green;">**100 XRP**</mark> will be placed.
* **Volume** \
  Order quantity (volume) is specified.\
  For example, entering <mark style="color:green;">**0.01**</mark> for **LTCBTC** pair will place an order with a volume of <mark style="color:green;">**0.01 BTC.**</mark>
* **Volume, USD**\
  Order quantity (volume) is specified in dollars.\
  For example, if <mark style="color:green;">**100**</mark> is specified for the **LTCBTC** pair, an order with a volume equivalent to <mark style="color:green;">**$100**</mark> will be created.
* **Full Balance, %**\
  Orders are created based on a percentage of the total balance.(wallet balance + position volume + position PnL). \
  For example, with <mark style="color:green;">**1000 USDT**</mark> in the wallet, <mark style="color:green;">**2000 USDT**</mark> in positions, a PnL of <mark style="color:green;">**100 USDT**</mark>, and a specified 10% balance, the order will be created for (1000 + 2000 + 100) x 10 / 100 = <mark style="color:green;">**310 USDT.**</mark>

{% hint style="info" %}
The full balance includes all tokens in your account. For instance, if your wallet holds 100 BUSD and 100 USDT, the total balance would be 200.
{% endhint %}

* **Full Balance% х Leverage**\
  Just like in the previous example, but the obtained amount is multiplied by the leverage. \
  From the example above, with a leverage of **5x** the order amount would be <mark style="color:green;">**1550 USDT.**</mark>
* **Free Balance, %**\
  Orders are created based on a percentage of the available balance in the specified market. \
  For example, with <mark style="color:green;">**500 USDT**</mark> in your wallet, <mark style="color:green;">**100 USDT**</mark> in positions, and a **10%** balance specification, the order will be created for an amount of (500 - 100) x 10 / 100 = <mark style="color:green;">**40 USDT.**</mark>
* **Free Balance х Leverage, %**\
  Just like in the previous example, but the obtained amount is multiplied by the leverage. \
  For example, using the data from the previous item and a <mark style="color:green;">**7x**</mark> leverage, the order amount will be <mark style="color:green;">**40\*7=280 USDT.**</mark>
* **Strategy amount**\
  When this option is selected, the signal message will contain the placeholder **{{strategy.order.contracts}}**, and a checkbox on the left will be checked.
* **Position volume, %**\
  Averaging quantity (volume) is based on a percentage of the current position. \
  If you specify 100, it will average the same amount currently open.
* **Position amount, %**\
  Averaging token quantity (contracts) is based on a percentage of the current position. \
  For instance, specifying 100 will average the same number of coins currently open.

### 5. Order type

{% content-ref url="../../../trading/create-order-grid/order-types" %}
[order-types](https://docs.finandy.com/trading/create-order-grid/order-types)
{% endcontent-ref %}

### 6. **Controlling options in the signal**

{% content-ref url="../controlling-an-option-in-the-signal" %}
[controlling-an-option-in-the-signal](https://docs.finandy.com/algo-trading/signals-tradingview/controlling-an-option-in-the-signal)
{% endcontent-ref %}

## Limits

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/8f4e7547-0262-44cd-a443-af58e9f3ba64/image.png" alt="" width="563"><figcaption></figcaption></figure>

### 1. Maximum position size

Averaging is skipped if signal's averaging amount + position's amount exceeds the specified value.

### 2. Maximum value

Activate the additional field to set a maximum position size from point 1.

Leave blank to remove the limit.

### 3. Averaging with open AC orders

<mark style="color:red;">**Disabling**</mark> this option <mark style="color:orange;">**prevents**</mark> averaging when there are unexecuted averaging orders in the position.

### 4. Order Auto-cancellation

After a specified time, the order will be canceled automatically.

**Do you have any questions? We can help you in our Telegram chat room.**

{% embed url="<https://t.me/finandy>" %}
