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 AILidex, 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, AILidex 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.
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.
Buy settings
Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using tssl as buy method.
Buy enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing buy orders.
Buy Level
Description
Values
Order types
Name
This sets the minimum target for buy trailing at a percentage below the lowest EMA. Trailing must finish below this level.
When you set this to 1, trailing for a buy order must finish at least 1% below the lowest EMA.
Buy Range
Description
Values
Order types
Name
This sets the buy range for trailing.
Setting a range of 0.5% at a starting price of 0.1 would set a range between 0.0995 and 0.1005.
As long as prices keep moving downwards, the range moves down along with the price. As soon as prices start going upward, the range freezes and a buy order is placed when the price crosses the upper boundary of the range.
Sell settings
Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using tssl as sell method.
Sell enabled
Description
Values
Order types
Name
Set this to false to prevent AILidex from placing sell orders.
Gain
Description
Values
Order types
Name
This sets the starting point for sell trailing. AILidex will start trailing once price reaches the set percentage above the break-even point.
When you set this to 1, trailing for a sell order starts when price reaches a point 1% above the average bought price.
Sell Range
Description
Values
Order types
Name
This sets the sell range for trailing.
Setting a range of 0.5% at a starting price of 0.1 would set a range between 0.0995 and 0.1005.
As long as prices keep moving upwards, the range moves up along with the price. As soon as prices start going downward, the range freezes and a sell order is placed when the prices crosses the lower boundary of the range.
Indicator settings
Relevant indicators for trading with tssl.
These settings have a direct effect on trading with tssl, because BUY_LEVEL is dependant on EMA.
Period
Description
Values
Order types
Name
This sets the candlestick period used for trading, this affects all indicators within the strategy.
Only use supported values. The trading settings editor suggests valid values for the selected exchange..
Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.
Slow EMA
Description
Values
Order types
Name
Set this to the amount of candlesticks you want to use for your slow EMA. The closing price for each candle is used in the slow EMA calculation.
For example: when you set PERIOD to 5, and want to use 2h for slow EMA – you need to set EMA1 to 24 (24 * 5 mins).
Medium EMA
Description
Values
Order types
Name
Set this to the amount of candlesticks you want to use for your medium EMA. The closing price for each candle is used in the fast EMA calculation.
For example: when you set PERIOD to 5, and want to use 1h for medium EMA – you need to set EMA2 to 12 (12 * 5 mins).