Brief Overview

This guide outlines three new alert commands you can use within TradingView to automate partial closes in lots, partial closes by percentage, and moving a position’s stop loss (SL) to breakeven. By the end, you’ll know exactly how to set up each command and what data is required.


Purpose and Audience

Purpose:

These new commands enable more precise trade management directly from TradingView alerts. Rather than manually adjusting positions, you can automate partial closes and SL adjustments to breakeven.

Who Should Read This Guide:

Traders using TradingView who are comfortable creating custom alerts, and who have some understanding of order management and stop-loss strategies. Basic familiarity with JSON alert formatting is helpful but not strictly required.


Steps / Instructions

1. Partially Close the Position in Lots

Screenshot 2025-03-05 at 13.14.09.png

  1. Overview:

  2. Required Parameters:

  3. Alert JSON Structure:

    {
      "type": "partially_close_by_lot",
      "assistId": "unique_assist_id",
      "source": "forex",
      "symbol": "forex_symbol",
      "lotSize": 0.1,
      "date": "{{time}}"
    }
    
    
  4. How to Add in TradingView:

  5. Validation Steps:


2. Partially Close the Position by Percentage

Screenshot 2025-03-05 at 13.15.53.png