---
title: Targeted Partial Close Using Comment (Indicator Alerts Only)
slug: reverse-order-close-tradingview-pickmytrade
date: 2025-08-21
modified: 2026-09-03
author: Bhavishya Goyal
excerpt: ""
meta_description: "Learn how the reverse_order_close setting works in PickMyTrade for TradingView alerts, and why it defaults to false to prevent position mismatches."
focus_keyword: ""
canonical_url: "https://docs.pickmytrade.trade/docs/reverse-order-close-tradingview-pickmytrade/"
og_title: Targeted Partial Close Using Comment (Indicator Alerts Only)
og_description: "Learn how the reverse_order_close setting works in PickMyTrade for TradingView alerts, and why it defaults to false to prevent position mismatches."
og_image: ""
schema_type: WebPage
categories: []
tags: []
reading_time: 1
word_count: 343
robots: "index, follow"
lang: en-US
---

# Targeted Partial Close Using Comment (Indicator Alerts Only)

**Last Updated:** September 3, 2026  |  **Published:** August 21, 2025

This feature allows you to **selectively close specific open positions** when trading with **indicator-based alerts**. By using a unique `comment` value when entering trades, you can later send a close alert targeting only that particular entry.

**Important:** This feature is available for **indicator alerts only** — not for TradingView strategies.

---

## **1. How It Works**

When placing an order via an indicator alert, attach a **unique `comment` field**. Each entry is then tagged for identification.

### **Example: Opening Two Buy Orders**

```
{
  "symbol": "NQ1!",
  "data": "buy",
  "comment": "buy1",
  "quantity": 1,
  "order_type": "MKT"
}
```

```
{
  "symbol": "NQ1!",
  "data": "buy",
  "comment": "buy2",
  "quantity": 1,
  "order_type": "MKT"
}
```

Here, two separate Buy positions are opened with comments **buy1** and **buy2**.

---

### **Example: Closing a Specific Position**

If you only want to close the second Buy position (`buy2`), send:

```
{
  "symbol": "NQ1!",
  "data": "close",
  "comment": "buy2",
  "full_closed": false,
  "quantity": 1,
  "order_type": "MKT",
  "price": "19950",
  "stp_limit_stp_price": 19950,
  "tp": 0,
  "sl": 0,
  "risk_percentage": 0,
  "dollar_tp": 0,
  "dollar_sl": 0,
  "percentage_tp": 0.2,
  "percentage_sl": 0.2,
  "trail": 0,
  "trail_stop": 0,
  "trail_trigger": 0,
  "trail_freq": 0,
  "same_direction_ignore": false,
  "advance_tp_sl": [],
  "update_tp": false,
  "update_sl": false,
  "reverse_order_close": false
}
```

**Result:** Only the **buy2** order is closed. The **buy1** order remains open.

---

### **Closing the Entire Position**

To flatten **all open Buy positions**, regardless of their `comment` values, use:

```
"full_closed": true
```

**Result:** Every Buy order is closed, no matter how many separate entries exist.

---

## **2. Key Benefits**

- **Precision Control** – Close only the entries you want without affecting other positions.
- **Scalability** – Manage multiple layered entries in the same direction.
- **Flexibility** – Decide between **partial targeted close** (by `comment`) or **full close** (using `full_closed: true`).

---

## **3. Limitations**

- Works **only for indicator alerts**.
- Not available in TradingView **strategy-based alerts** (to prevent position mismatch issues).

---

## **4. Summary**

With **Targeted Partial Close**, you can manage complex multi-entry positions more effectively by tagging each order with a `comment`. This lets you **close individual trades selectively** or **flatten everything at once**—giving you full control over your automated execution.

[Get PickMyTrade → Automate Your TradingView Strategies](https://pickmytrade.trade "PickMyTrade - Automated Trading")

Last updated: **September 3, 2026**

For AI tools &amp; developers:[View Markdown →](https://docs.pickmytrade.trade/docs/reverse-order-close-tradingview-pickmytrade.md)