trailing-stop - Native Trailing Stop
Add exchange-native trailing stop protection to market entries or existing positions.
Supported futures markets: Binance Futures, HTX V5 and WEEX Futures. Spot markets are not supported.
Syntax
// Inline on market entries
market long|short <amount> ts <activation>/<callback>
market long|short <amount> sl off <sl> tp off <tp> ts <activation>/<callback>
// Standalone for an existing position
trailing-stop long|short <amount> <activation>/<callback>
trailing-stop long|short <amount> @<price> off <offset>Parameters
long | shortRecommendedSelects the position side to protect. In hedge mode, specify the side so Flipr.Cloud can target the correct position side without ambiguity.
amountOptionalQuantity to close when the trailing stop triggers. Standalone trailing-stop defaults to 100%p. Inline ts uses the market entry size.
activationRequiredDefines when the exchange starts trailing. A bare value like 2% is a favorable offset from the entry reference. The reference is the latest market entry in the block, otherwise the existing position entry; current price is used if no entry reference is available. An absolute value uses @ or at, such as @65000.
callbackRequiredDefines how far price can retrace after activation before the trailing order closes the selected quantity. Percent values specify the callback rate directly. Absolute offsets, in quote-currency units, are converted to a percentage of the activation price; the trailing distance remains percentage-based after activation.
Exchange Compatibility
| Futures market | Trigger source | Callback |
|---|---|---|
| Binance | last or mark | 0.1%–10%, rounded to one decimal place |
| HTX V5 | last only | Positive percentage; subject to exchange validation |
| WEEX | last or mark | 0.1%–99.99% |
The default trigger is last. index is not supported for these trailing stops; HTX also rejects mark. Quantity, activation price and account-mode restrictions still apply on each exchange.
Accepted Formats
| Format | Description |
|---|---|
ts 2%/1.5% | Activate after a favorable 2% move, trail by 1.5% |
ts @65000/1000 | Activate at 65000; convert 1000 quote-currency units to a callback percentage |
ts @65000 off 1000 | Same as above, written with explicit off |
trailing-stop short 100%p @65000/1000 mark | Standalone trailing stop using mark price on Binance or WEEX |
Examples
Market Entry with Fixed SL/TP and Trailing Stop
BTCUSDT on Binance_F
market long 0.01 sl off 2% tp off 3% ts 2%/1.5%Opens a long, places fixed SL/TP, and adds a trailing stop that activates after a favorable 2% move.
Absolute Activation with Absolute Offset
BTCUSDT on Binance_F
market long 0.01 ts @65000/1000Starts trailing only after price reaches 65000. The 1000 offset is converted to Binance callback rate.
Standalone on an Existing Short
BTCUSDT on Binance_F
trailing-stop short 100%p @65000/1000 markTargets the open short side and creates a native Binance trailing stop using mark price.
Inline trailing stops require a market entry.
For a limit entry, wait until a position exists before sending a standalone trailing-stop command. Adding ts to the limit command does not schedule a trailing stop after its fill.
Related Commands
market - Use inline ts on market entries
stoploss - Fixed stop loss protection
takeprofit - Fixed profit target protection