Skip to main content

TSSL

Price trailing sets a range for buying and selling, then follows prices as they move to find entry and exit points. It helps avoid entering while price is still moving in the same direction.

To use trailing in Gunbot, set a percentage-based trailing range. When the threshold is met, Gunbot tracks price and adjusts the trailing stop for buy or sell orders.

Buy method conditions

Trailing starts when price is below the configured buy level %, the initial trailing stop is placed at buy range % above the current price. As long as price moves downwards, the trailing stop moves downwards too. When price moves upwards, the trailing stop freezes. A buy is allowed when price crosses over the trailing stop price, while the buy level % condition is still met.

Sell method conditions

Trailing starts when price is above the configured gain %, the initial trailing stop is placed at sell range % below the current price. As long as price moves upwards, the trailing stop moves upwards too. When price moves downwards, the trailing stop freezes. A sell is allowed when price crosses under the trailing stop price, while the gain % condition is still met.

Trading example

TSSL strategy example showing trailing stop and limit order execution

Example of how trading with this strategy can perform. Details and settings

The infographics below describes what triggers trades with this strategy.

TSSL strategy diagram illustrating buy and sell trigger conditions

TSSL strategy visualization showing dynamic trailing stop mechanics

You can select an option to only sell at profit, to avoid the risk of a stop limit sell at loss while you're still in the initial range around bought price. This is called TSSL_TARGET_ONLY.

Minimum profit = tssl - SELL_RANGE

You can optionally use additional indicators like RSI for extra confirmation on entry and exit points.

Strategy settings for TSSL

Buy settings

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueEnable or disable buy (long) orders for the strategy.
Buy levelBUY_LEVEL1Percentage below the lowest EMA where buy orders are permitted.
Buy rangeBUY_RANGE0.3Percentage range for trailing buy orders.

Sell settings

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueEnable or disable sell (short) orders for the strategy.
GainGAIN1Gain target above the break-even point for sell orders.
Sell rangeSELL_RANGE0.3Percentage range for trailing sell orders.
Count sellCOUNT_SELL9999Number of sell orders that can be executed for a pair before it is disabled.

Indicators

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15Time interval for each candlestick used in indicator calculations. Ensure the value is supported by your exchange.
Medium EMAEMA116Medium Exponential Moving Average (EMA) length, in candles.
Fast EMAEMA28Fast Exponential Moving Average (EMA) length, in candles.

Overview of effects on different order types

Config ParameterAffected Order TypesNot Affected Order Types
Buy EnabledStrategy buy, DCA buy, RT buy, RT buybackStrategy sell, Stop limit, Close, RT sell
Buy LevelStrategy buyStrategy sell, Stop limit, Close, RT sell
Buy RangeStrategy buyStrategy sell, Stop limit, Close, RT sell
Sell EnabledStrategy sell, Stop limit, RT sellStrategy buy, RT buy, RT buyback, Close, DCA buy
GainStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Sell RangeStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
PeriodStrategy sell, Strategy buy, DCA buy (trigger)RT buy, RT buyback, RT sell, Close, Stop limit
Slow EMAStrategy buyDoes Not Affect: RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy
Fast EMAStrategy buyDoes Not Affect: RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy