Take-Profit and Stop-Loss (TP/SL)

What Are TP/SL?

Take Profit (TP): A Take Profit order automatically closes a position when the price reaches a predetermined profit level. This ensures that traders can lock in gains without constantly monitoring the market. TP orders are beneficial in volatile markets with rapid price movements.

Stop Loss (SL): A Stop Loss order, on the other hand, is designed to minimize losses. It automatically closes a position when the price falls to a specified level. This helps traders protect their capital and manage risk in unpredictable market conditions.

Benefits of Using TP/SL

  1. Risk Management: TP/SL orders help manage risk by limiting potential losses and securing profits.

  2. Emotion-Free Trading: Automating these orders reduces the emotional impact of trading decisions, ensuring a more disciplined approach.

  3. Time Efficiency: Traders do not need to monitor the market constantly, as these orders execute automatically.

  4. Improved Profitability: Properly setting TP/SL can enhance trading performance by optimizing entry and exit points.

Key Features of TP/SL

  1. Setting TP/SL with Order Placement: TP/SL triggers can be defined when placing an order. Once the order is executed and converted into a position, the specified TP/SL triggers are automatically associated with it.

  2. Creating TP/SL for Existing Positions: A TP/SL trigger can be created for positions that are already open.

  3. Volume Customization: Users can create a single TP/SL trigger for the entire position volume or specify a quantity (qty) derived from the position.

  4. Order Cancellation: If an order is canceled, any TP/SL triggers linked to it are also automatically canceled.

Calculations and Execution

  1. Restrictions on Full-Position TP/SL: Only one TP and one SL can exist for the entire position. If a user attempts to create a second trigger, it will replace the first.

  2. Partial TP/SL: Users can set multiple partial TP/SL triggers, provided their total volume does not exceed the position size. Partial TP/SL triggers can coexist with a single full-position TP/SL without conflict.

  3. Position Integrity: The position should not be reversed upon executing the TP/SL order. When the backend detects a trigger price for TP/SL, it calculates the executable volume based on the current position. All other TP/SL triggers are canceled if this volume equals the entire position.

User-Defined Trigger Calculations

  1. ROI (Return on Investment): The trigger price is calculated based on a specified percentage of profit. For example, if a user wants a 10% profit, the position will close once it achieves this profit.

  2. Change %: The trigger price is set based on the percentage change in the coin's price. For instance, setting a 10% trigger when Bitcoin’s current price is 100,000 USDT will activate the trigger at 110,000 USDT.

  3. P&L (Profit and Loss): A specified profit or loss in USDT determines the trigger price. For example, if the user wants the position to close after earning or losing X USDT, the system calculates and sets the corresponding trigger price.

Dependency of Orders on Positions

Replacing Existing TP/SL Triggers: If a position already has TP/SL triggers for a trading pair, and a new order with TP/SL for the same pair is satisfied, the new TP/SL replaces the previously set triggers for the pair.

For example, if a user has a 10 BTC position with TP/SL at 90,000 USDT for 100% of the volume and places a new order to buy 2 BTC with a TP/SL at 91,000 USDT for the entire position, the TP/SL updates to 91,000 USDT after one BTC from the order is filled and the other is canceled.

Complementing Existing TP/SL with Partial Orders: If a position already has TP/SL triggers and a new partial order TP/SL is set, they complement each other.

For example, if a user has a 10 BTC position with TP/SL at 90,000 USDT for 100% of the volume and sets a new TP/SL for 10% of the volume at 89,000 USDT, the system creates two TP/SL orders: one for 10% of the volume at 89,000 USDT and another for 90% of the volume at 90,000 USDT.

Last updated