strategy-tp-sl

Define Take Profit and Stop Loss configuration rules for trading strategy JSON.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/LivTorgEx/strategy-skill --skill strategy-tp-sl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategy-tp-sl
Source: https://github.com/LivTorgEx/strategy-skill/tree/main/skills/strategy-tp-sl
Command: npx skills add https://github.com/LivTorgEx/strategy-skill --skill strategy-tp-sl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes guesswork from setting correct Take Profit and Stop Loss rules so your trading bot can close positions at the right times and with the right gating, direction, and price logic.

Core Features & Use Cases

  • NextOrder TP/SL field reference: Define TP/SL direction, gate conditions (activates), additional placement gates (filters), and the order template with price and sizing.
  • only_great control for stop-loss behavior: Support proper SL behavior by documenting when to set only_great=false so SL can trigger at a loss rather than only when in profit.
  • Optimizer TP/SL multi-branch selection: Use TP Optimizer (select best among take_profits) and SL Optimizer (select best among stop_losses) including the backend-specific variant spelling (Futher).

Quick Start

Ask an agent to generate a BotGroupSetting JSON snippet that adds a Stop Loss and Take Profit using NextOrder, sets SL only_great=false, and places an activate gate with MarkPrice plus a percentage threshold.

Frequently Asked Questions about strategy-tp-sl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure stop loss to trigger at a loss in a trading bot JSON?

To configure stop loss to trigger at a loss, set the only_great field to false in your trading bot JSON. This allows the stop-loss order to execute regardless of whether the position is in profit, ensuring proper position-closing behavior for long or short directions.

What is an optimizer selection for take profit and stop loss?

An optimizer selection for take profit and stop loss is a branching mechanism that evaluates multiple position-closing variants and selects the best match among defined take_profits or stop_losses arrays. This includes handling backend-specific variant structures like the Futher spelling for correct SL Optimizer execution.

How do I add activation gates and placement filters to a take profit order?

To add activation gates and placement filters to a take profit order, define the activates and filters syntax fields within the NextOrder configuration. Activates set gate conditions like MarkPrice with a percentage threshold, while filters apply additional placement gates before the order template executes.

Can I define take profit and stop loss rules for both long and short directions?

Yes, you can define take profit and stop loss rules for both long and short directions. The configuration requires correct field structures specifying the direction, allowing you to construct position-closing logic that applies independently to either or both directions with optional activation gates.

What are dynamic price base types in strategy settings?

Dynamic price base types in strategy settings are reference points used to calculate order pricing within the NextOrder template. They define how the price field structures are constructed for take profit and stop loss orders, ensuring the trading bot closes positions based on correct dynamic market price references.

Why does my stop loss only trigger when the position is in profit?

Your stop loss only triggers when the position is in profit because the only_great behavior is enabled. To fix this and allow the stop loss to trigger at a loss, explicitly set only_great=false in the stop-loss configuration block of your strategy JSON.