# Trade Panel

## Trade Panel — Main Order Panel

The Trade Panel sits in the right sidebar of the terminal. It is the central hub for placing orders, monitoring open positions, and reviewing closed trade history — all in one place.

***

### Layout

The panel has three tabs:

| Tab           | Purpose               |
| ------------- | --------------------- |
| **Order**     | Place a new order     |
| **Positions** | Manage open positions |
| **History**   | Review closed trades  |

The top of the panel always shows the **current symbol** and the **live market price**.

> You can drag the left edge of the panel to resize its width.

***

### Order Tab

#### 1. Available Balance

The **Avbl** line shows your USDT available to trade right now. It updates in real time from your Binance account.

***

#### 2. Side — Long or Short

Click one of the two buttons:

* **Long** — buy, expecting price to rise
* **Short** — sell short, expecting price to fall

***

#### 3. Order Type — Market or Limit

* **Market** — fills immediately at the current market price
* **Limit** — you set a target price; the order waits until price reaches that level

When Limit is selected, an **Entry Price** field appears for you to type your target.

***

#### 4. Leverage

Click the **Nx** badge to open the leverage selector. Available levels depend on the coin (pulled from Binance).

* **Server: Nx** shows the leverage currently set on your Binance account.
* After selecting, the new leverage applies to your next order.

***

#### 5. Quantity

Enter your position size in **two units**:

* **USDT** — type the margin you want to put in. The system calculates the corresponding coin amount based on leverage.
* **Coin** — type the exact coin amount directly.

Click the unit button (e.g. `USDT` or `BTC`) to toggle between the two. The value converts automatically when switching.

**Slider and quick-percent buttons:**

Drag the slider or click **25% / 50% / 75% / 100%** to auto-fill the quantity as a percentage of your available balance.

**Info row below the inputs:**

| Label    | Meaning                                                       |
| -------- | ------------------------------------------------------------- |
| **Cost** | Actual margin you are putting in (USDT)                       |
| **Max**  | Maximum position size you can open with current balance       |
| **Qty**  | Coin amount that will actually be opened (shown in USDT mode) |

> Hover over the ℹ️ icon next to Quantity for a detailed breakdown of how the number is calculated.

***

#### 6. Stop Loss

Type your SL price in the **Stop Loss** field. The position closes automatically if price reaches this level.

Leave blank if you do not want a stop loss.

***

#### 7. Take Profit

You can set up to **6 TP levels** per order.

**Add a TP level:** Click **+** on the right side of the Take Profit header.

**Split quantity between TP levels:**

When two or more TPs are set, each row has a **%** field showing how much of the position closes at that level. The total across all TPs must equal **100%** before the order can be submitted.

**Remove a TP level:** Click **×** at the end of the row.

***

#### 8. Auto SL/TP

Automatically calculates appropriate SL and TP levels based on:

* Entry price
* Direction (Long/Short)
* Leverage
* Actual swing highs and lows on the chart (current timeframe)

**How to use:**

1. Choose how many TP levels you want (click the number dropdown next to the Auto button — options: 2 to 6).
2. Click **Auto** (wand icon ✨).
3. SL and all TP levels are filled in automatically.

You can manually adjust any field after Auto fills it.

→ Full details on how the algorithm works: Auto SL / TP

***

#### 9. Submit the Order

Click the green **Buy / Long** or red **Sell / Short** button to send the order.

* The button is disabled if no quantity is entered, or if TP percentages do not total 100%.
* A confirmation (or error) notification appears inside the panel immediately after submission.

***

### Positions Tab

Shows all currently open positions. A **Total PnL** line at the top displays combined unrealized profit/loss across all open trades.

Positions are split into two groups:

#### Active (filled) positions

Each row shows:

* Coin symbol (e.g. `BTC`, `ETH`)
* **L** or **S** — Long or Short
* Leverage (e.g. `20x`)
* **PnL** — current profit/loss in USDT
* **ROE%** — profit/loss as a percentage of margin

Click any row to **expand** the detail view:

| Field     | Description                               |
| --------- | ----------------------------------------- |
| Qty       | Coin amount held                          |
| Entry     | Entry price                               |
| Mark      | Current market price                      |
| SL        | Stop Loss price (click to edit inline)    |
| TP1, TP2… | Take Profit levels (click to edit inline) |

**Edit SL/TP inline:**

Click the SL or TP price — an input field appears in place. Type the new price, then press **Enter** or click away to save. Press **Escape** to cancel.

**Add a TP to an open position:**

Click **+ Add TP** to add a new profit target.

**Auto SL/TP for a running position:**

Same as at order entry — choose the number of TPs and click **Auto**. Only available when the position has no TP set yet.

**Close the position:**

Click the red **Close Position** button at the bottom of the expanded row. Closes at market price.

***

#### Pending (Limit orders waiting to fill)

Shown separately below Active positions, labeled **PND** with a pulsing badge.

Displays the target price and the **distance (%)** from current price to the limit price.

When expanded, you can still edit SL/TP or add TPs before the order fills.

**Cancel the limit order:** Click **Cancel Limit Order**.

> SL/TP only activates after the Limit order fills.

**Open the chart for another coin:** If the position is on a different coin than the current chart, click the 📈 icon to switch the chart to that symbol.

***

### History Tab

#### Time range filter

Select one of: **7d / 14d / 30d / 60d / 90d** to filter history by the number of recent days.

#### Summary stats

Displayed immediately below the filter:

| Label  | Meaning                                        |
| ------ | ---------------------------------------------- |
| Trades | Total number of closed positions in the period |
| Win    | Number of winning trades                       |
| Loss   | Number of losing trades                        |
| WR     | Win rate (%)                                   |
| PnL    | Total realized profit/loss                     |

#### Trade list

Each row shows:

* Coin symbol
* **L** or **S** (Long/Short)
* Leverage
* Realized PnL
* Close reason:
  * **TP Hit** — take profit triggered
  * **SL Hit** — stop loss triggered
  * **Manual** — closed by hand
  * **Liq.** — liquidated
  * **Cancelled** — order cancelled

Click any row to expand full details:

| Field | Description              |
| ----- | ------------------------ |
| Qty   | Position size            |
| Entry | Entry price              |
| Close | Exit price               |
| ROE   | Return on equity (%)     |
| Open  | Time the position opened |
| Close | Time the position closed |

#### Refresh controls

* Click **↺** to reload the history list.
* Click the **database icon** to re-fetch realized PnL from Binance (useful when older trades show a blank PnL).

***

### In-Panel Notifications

After each order action, a small toast appears at the top of the panel:

* **Green** — order executed successfully
* **Red** — order rejected (reason shown)
* **Yellow** — order cancelled

Click the notification to dismiss it.


---

# 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/terminal-trade-eng/trade-panel.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.
