Skip to main content

TSSL

Price trailing is a useful method that involves setting a customizable range for buying and selling, then following prices as they move up or down to identify optimal entry or exit points. By doing this, you can avoid trading while prices are still trending in the same direction.

To implement price trailing with Gunbot, you'll first need to establish your preferred trailing range. This will typically involve setting a percentage-based threshold that triggers the bot to begin monitoring prices for potential trades. Once the threshold is met, Gunbot will actively track prices and adjust its buy/sell orders accordingly to maximize returns.

One of the primary benefits of price trailing is that it allows for more flexible trading strategies that can adapt to changing market conditions.

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

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

The infographics below describes what triggers trades with this strategy.

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_ENABLEDtrueWhen enabled, this setting allows you to execute buy or long orders. This can be turned off to prevent new buy orders while allowing other operations to continue.
Buy levelBUY_LEVEL1This setting determines the percentage below the lowest Exponential Moving Average (EMA) where buy orders are permitted. The default setting is 1%, with an adjustable range from 0.1% to 5%.
Buy rangeBUY_RANGE0.3This sets the buy range as a percentage for trailing buy orders. The default value is 0.3%, with a permissible range from 0.01% to 5% for practical adjustments.

Sell settings

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueWhen enabled, this setting allows the strategy to execute sell or short orders.
GainGAIN1This setting specifies the gain target above the break-even point for sell orders.
Sell rangeSELL_RANGE0.3This sets the sell range as a percentage for trailing sell orders.
Count sellCOUNT_SELL9999This setting determines the number of sell orders that can be executed for a pair before it is disabled. The default is set at 9999, meaning it can accommodate a high volume of orders before deactivation.

Indicators

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period setting defines the time interval for each candlestick used in calculating indicators. It is set to 15 minutes by default. Ensure the value you choose is supported by your exchange.
Medium EMAEMA116The medium Exponential Moving Average (EMA) is calculated over 16 candles by default. This setting helps smooth out price data over a medium-term time frame to identify trends.
Fast EMAEMA28The fast Exponential Moving Average (EMA) uses 8 candles to calculate a quicker responding average, allowing for more responsive trading decisions based on shorter-term price changes.

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