Skip to main content

TSSL (futures)

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.

How to work with this strategy​

Gunbot will open one position, either long or short, and close this position when the target is reached. When the stop is hit before profitably closing a trade, Gunbot will place a stop order at loss. After closing a position, Gunbot will again look to open a new long or short position. Gunbot will not add to existing open positions.

info

Using tssl (futures) is only meaningful with MEAN_REVERSIONenabled.

The info below assumes you have set this.

The examples below show how the basic triggers for tssl work. Additionally, you can use confirming indicators and settings like ROE trailing.

Buy method conditions​

TSSL futures strategy long position trailing buy trigger visualization

Opening a long position is allowed when buy trailing finishes below LONG_LEVEL.

Sell method conditions​

TSSL futures strategy short position trailing sell trigger visualization

Opening a short position is allowed when sell trailing finishes above SHORT_LEVEL.

Conditions to close​

Position is closed when the desired ROE (return on equity) is reached. This is a percentage from the entry point, taking leverage into consideration.

Conditions to stop​

A position is closed at loss when negative ROE reaches the STOP_LIMIT target.

Strategy settings for TSSL (futures)​

Long settings​

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueThis setting enables you to allow or disallow buy (long) orders in your trading strategy. When set to true, buy orders are allowed.
Long levelLONG_LEVEL1This parameter determines the percentage distance from the Exponential Moving Average (EMA) at which long orders can be placed. Set this to specify how far away from the EMA your entry point should be.
Buy rangeBUY_RANGE0.3This setting defines the buy range for trailing. It is expressed as a percentage that specifies the trailing distance for buy orders following the price down before placing a buy.

Short settings​

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueThis setting allows you to enable or disable sell (short) orders within your strategy. When enabled, it permits the placement of sell orders.
Short levelSHORT_LEVEL1The short level is the percentage distance from the EMA where short orders are allowed. This setting helps determine the threshold for entering short positions relative to the EMA.
Sell rangeSELL_RANGE0.3Sets the sell range as a percentage, defining how much the price should move up before initiating a trailing sell order. This helps in capitalizing on price increases before a sell order is executed.

Indicators​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period defines the timeframe of the candlesticks used in the calculation of indicators, specified in minutes. Ensure that the value you select is supported by your exchange.
Medium EMAEMA116This setting specifies the number of candles used to calculate the medium Exponential Moving Average (EMA), providing a balance between responsiveness and smoothing of price movements.
Fast EMAEMA28The fast EMA setting adjusts the number of candles used to calculate a faster, more responsive EMA, suitable for identifying earlier signals in a fast-moving market.
Mean reversionMEAN_REVERSIONtrueEnabling this option uses the mean reversion variant for your selected buy and sell methods, adapting your strategy to capitalize on price returns to a mean value.