# 6. Trading Management

This section explains how the bot handles open positions when receiving new trading signals. The behavior depends on the selected Trading Mode (`Only One` or `Multi`) and Margin Type (`Both`, `Long`, or `Short`).

<details>

<summary>Overview</summary>

* **Only One**: The bot only keeps one active position per direction. A new signal of the opposite direction will close the current position before entering the new one. Same-direction signals are skipped.
* **Multi**: The bot allows multiple positions in the same direction. New signals will add to existing positions. Opposite-direction signals are ignored.

</details>

<details>

<summary>BOTH + trading_mode</summary>

**BOTH + ONE**

* Opposite signal → Close current position → Enter new position
* Same-direction signal → Skip

**BOTH + MULTI**

* Opposite signal → Close current position → Enter new position
* Same-direction signal → Add new position

</details>

<details>

<summary>LONG + trading_mode</summary>

**LONG + ONE**

* Receive LONG signal → Close SHORT (if any) → Enter LONG
* Receive SHORT signal → Skip
* Receive another LONG signal while an active LONG is running → Skip

**LONG + MULTI**

* Receive LONG signal → Close SHORT (if any) → Enter LONG
* Receive SHORT signal → Skip
* Receive another LONG signal while an active LONG is running → Add new LONG position

</details>

<details>

<summary>SHORT + trading_mode</summary>

**SHORT + ONE**

* Receive SHORT signal → Close LONG (if any) → Enter SHORT
* Receive LONG signal → Skip
* Receive another SHORT signal while an active SHORT is running → Skip

**SHORT + MULTI**

* Receive SHORT signal → Close LONG (if any) → Enter SHORT
* Receive LONG signal → Skip
* Receive another SHORT signal while an active SHORT is running → Add new SHORT position

</details>

<details>

<summary>Example</summary>

> **Scenario**: Trading Mode = LONG + MULTI
>
> * Current position: 1 open LONG
> * New LONG signal arrives → Bot adds another LONG position

> **Scenario**: Trading Mode = SHORT + ONE
>
> * Current position: 1 open SHORT
> * New SHORT signal arrives → Bot skips (does not add more)

</details>

<details>

<summary>Notes</summary>

* Combine `Margin Type` + `Trading Mode` strategically to match your risk tolerance and trading style.
* You can update this setting anytime from the **Trading Management** menu.
* Always review open positions manually when switching between `One` and `Multi` to avoid unintended trades.

</details>

From the main menu, select:

📍 **API Connect** → Choose `Margin Type`  → Choose  `Both` or `Long` or  `Short`&#x20;

{% columns %}
{% column %}

<figure><img src="/files/GBk8SSe40wbFHFfIsZO4" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/eig3xyXKCoLwLr1WjIO7" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/AcH3bmKfS7PKXdwHFnTS" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

📍 **Trading Management** → Choose `Only One` or `Multi`

{% columns %}
{% column %}

<figure><img src="/files/9AHNM3e1CoDnDqBZUBiJ" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/6ZIR651lIkOxrDx6nt6X" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mrd-indicators.com/feature/auto-trading-bot/auto-trading-bot-setup/6.-trading-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
