# Full list of DCA-bot settings

> Step by step: how to create a Veles DCA-bot from scratch or using a template, and an explanation of each parameter.

There are two ways to create a bot in Veles: **copy a template** and adapt it for yourself, or **build a bot from scratch**. For beginners, we recommend starting with learning strategies and ready-made presets, then gradually making changes.

:::note
Use the hints in the configurator: buttons (i) and (?).
:::

## How to copy a bot from a template

1. Open the **"Ready-made bots" section** on the main page of your personal account: https://veles.finance/cabinet — the showcase is regularly updated.

2. Study the ready-made settings on our blog: https://veles.finance/en/blog/

If you open the bot using a link from the showcase or from the blog, you will get a **personal copy** of the settings. Until you **save it**, the bot will not appear in the list in your cabinet.

To save the bot, specify:
- [**Binding to the API key**](https://help.veles.finance/en/exchange/general/api/) of your exchange (the template may have a different exchange);
- if necessary — **trading pair, deposit and leverage**. The remaining parameters will be pulled up from the template.

## How to create a new bot from scratch

Click **"Create bot"**, check, that DCA tab is selected, fill in the key fields and save.

:::caution[Important]
Before the launch, **be sure to** run a backtest (see Net profit, MAE and how the last deal in the period closed). Review it with support or with experienced users. Only if you are satisfied with the results, launch the bot on the exchange.
:::

Read more:
- About API keys and bindings — [in this article](https://help.veles.finance/en/exchange/general/api/).
- About launching and analyzing backtests — [in this article](https://help.veles.finance/en/platform/components/backtests/).

After saving, the bot will appear on the main page: https://veles.finance/cabinet.

- If the bot is not visible, click on the "Trash Bin" (clear filters for the bot list) or check the second page of the list.

The description of the bot card is [here](https://help.veles.finance/en/platform/components/bot-card/).

## How to edit a bot without risk

Open the bot card → **"Pencil icon / Edit"**.

If the bot is already "Running" the deal, it will **finish the current deal** using the old settings, and apply the changes **in the next** trade.

To avoid confusion:
1) **Clone** the bot,
2) change the settings in the clone,
3) **stop** the original,
4) **launch** the clone.

## Full list of settings

### Bot name
Give an informative name — it will speed up the search when there are a lot of bots.

### API key (Binding)
Select a pre-created **Binding to the API key**. The type of trading (spot/futures/inverse futures) depends on it. How to create — [see instructions](https://help.veles.finance/en/exchange/general/api/).

### Trade type

Choose the algorithm: **Long** or **Short**.
More information about the directions is [in the article](https://help.veles.finance/en/getting-started/overview/bot/#long-and-short-trading).

### Trading Pair

Set a trading pair. The first coin is called **base**, the second is the **quote currency**, usually USDT/USDC. The list shows popular pairs for 24 hours.

How the **multipair bot** works is described in the [instruction](https://help.veles.finance/en/platform/settings/multipair/).

> Don't see the right pair in the list? Write to support "Please add a trading pair" and attach a link like this:
`https://www.bybit.com/trade/usdt/ETHUSDT`.

### Deposit

The amount within which the bot trades.

- **Spot:** the deposit is divided to orders and placed on the exchange.
- **Futures:** the deposit is multiplied by leverage, then divided to orders.

### Exchange Balance (read-only)

The non-editable field shows the amount of the quote currency on the trading account.

> Depending on the exchange, not the entire amount may be visible (for example, only the balance that is not involved in trading).

Recommendation: for futures, set a **deposit as ≈ 1/10** of the balance. For the exact calculation, see [this article](https://help.veles.finance/en/getting-started/strategies/reduce-risks/).

### Leverage

Available on futures. Increases position volume, as well as **risks** of trading.

:::caution[Important]
1) If there is **already an open position** for the coin — set the same leverage in the bot, because the bot will change the leverage on the trading account both for Long and Short directions.
2) Bots on the same account, even under **position lock**, must have **the same leverage**. The bot sets the leverage first, and only then can it be limited by the lock.
:::

### Margin type

- **Isolated:** risk is limited to a margin of a specific position.
- **Cross:** risk affects the balance of the entire trading account (+ collateral coins, if configured).

:::caution[Important]
Make sure that **all bots on the same account** work with **the same margin type** — on many exchanges, the margin type switches **for the entire account at once**.
:::

### Reinvest

Automatic increase of the bot's deposit after profitable trades. Recommended only for strategies without Stop Loss.

Be sure to review the [recommendations for safely configuring](https://help.veles.finance/en/platform/settings/reinvest/) this feature.

### Trading mode: "Simple", "Own", "Signal"

- **Own**: trade with one order or manually set the indents and volumes in the limit [DCA-grid](https://help.veles.finance/en/getting-started/strategies/dca/).
- **Simple**: grid of limit orders is built automatically.
- **Signal**: market averaging orders with filters/indicators (each order is based on a set of conditions).

### Overlapping of price changes

The %-range between the **first** and **last** order in the grid. Choose the % based on the typical volatility of the instrument.

### Grid of orders (number)

The more orders there are in the grid, the **smaller** each order will be (the position volume is divided into more parts).
Evaluate the grid on the preview chart.

### % Martingale

The parameter determines how the volume **of each subsequent** order increases in the grid. The higher the Martingale percentage, the faster the average position price pulls up to the current one.

### Indent of the first order

- **Long:** the limit order placed below the deal entry price by the specified %.
- **Short:** the limit order placed higher than the deal entry price by the specified %.

We recommend **0 / "Market"** — in order not to lose entry points due to **Pull up** and commission nuances.

The grid is built **from the first order** up to the selected **overlapping %** (downwards for Long, upwards for Short).

### Logarithmic price distribution

Defines the **step** between orders.

- Off: uniform distance.
- More than 1 — tighter at the current price / stretched at the edges.
- Less than 1 — stretched at the current price / tighter at a distance.

### Partial placement of a grid of orders

Limit the number of **simultaneously placed** orders (for example, 3). The rest of orders will have the **"Pending" status** and they will be placed on the exchange as soon as the active ones are executed.
This is necessary for wide grids (with a large % overlap) and when there are a lot of orders in the grid.

### Pulling up the order grid

If the price has gone away from the placed orders, the bot will **cancel the deal (all the orders)** and wait for a new entry point.

If you set for the 1st order **Indent = 0 / "Market"**, the Pull up **is ignored** (but the parameter must be configured anyway to save the bot).

:::danger[Be careful with the Indent and the Pull up]
If the values are set too high, it may take **hours/days** between **placing** and **executing** the first order. By the time the condition is fulfilled, **the indicators are already inappropriate**, the deal entry point will be "wrong". Check the timing of the order creation/execution!
:::

> On a real exchange, the grid **always** differs slightly from the calculated one: there are restrictions on the price/volume step, indivisible lots, etc. The bot adjusts the grid to the rules of the exchange.

### Stop bot after N deals completing

Specify the limit of deals, after which the bot will switch to the status **"Terminated"**. If you edit the parameter during an active deal and set it to "1", then **the current deal** will be counted as the first one.

### Include a position on the exchange in a trade

Transfers the **already open** futures position under the control of the bot (for example, after an error, manual trading, or execution of forgotten orders). 

The included position will be marked as order "-1" with "Position" type, pictured as "hanging in the air" on the graph.

### Trade entry conditions

- **No filters**: bot will open a new deal **immediately** after the previous one is closed.
- **Filters added**: you will need to set **filters**, and the bot will wait for **all conditions to match**.

The indicators on the platform are constantly updated. The editor has a button **"?"** with a quick access to help articles about each indicator.

The **"Calculate / Show"** buttons are for previewing the start points on the graph.

### Take profit

Three modes to choose:
- **Simple**: one limit order at % profit,
- **Own**: partial limit Take Profits at different levels with Stop Loss at Breakeven,
- **Signal**: exit with **market** order by the indicator signal (we recommend adding a **Minimum PnL** check).

### Stop loss

Limitation of potential losses. Before turning it on, study the [detailed description](https://help.veles.finance/en/platform/settings/stop-loss/) and compare the levels with the statistics of the wicks (see [Backtests](https://help.veles.finance/en/platform/components/backtests/)).

### Test

Run the backtest **before** real trading (even if it's someone else's preset/purchased preset).
How to read the results and look for weaknesses in a strategy see [this article](https://help.veles.finance/en/platform/components/backtests/).
If something is unclear, ask questions in the support/community chat.

### TradingView chart

Chart for the selected coin with a preview of your grid and prices calculated **from the current price** (and not from a hypothetical entry point). You will see:
- how wide is the grid in total and the indents between the orders,
- the final **average price** after the execution of the entire grid,
- the level and sum of the **stop loss** (if it is enabled).

Zoom in to check all the orders.

Each order must have a **label with price** (red/green) and **volume** (black badge).
If there is **no volume** for some order, you will not be able to create it (bot will get an **error**). 

The [Indicator Selection](https://help.veles.finance/en/platform/settings/indicator-selection/) tool is available on the chart, it can serve as a starting point for building your strategy.

### Create/Update a bot

The button is activated when **all required fields** are filled in (including "Pull up", filters for **Profit → Signal**, etc.).

The name of the bot must be **unique**.

To **rename** — open bot in the editor, change the "Name" and click **"Update"**.
