Type/to search

Trailing Stop Loss Reversal Strategy

Cryptocurrency
Created: 2023-12-01 13:41:41
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This is a very simple strategy. It consists of only one trailing stop loss. When the stop loss is triggered, the position is reversed and a trailing stop loss is set for the new position.

Strategy Logic

The strategy is built based on one of three stop loss types: percentage stop loss, ATR stop loss, absolute stop loss. When the stop loss is triggered, the position is reversed and a trailing stop loss is set for the new position.

Specifically, the strategy first calculates the stop loss value based on the chosen stop loss type. It then checks for entry signals, going long when high is above previous stop loss price and going short when low is below previous stop loss price. After entering, it keeps updating the stop loss price to trail price changes. Long stop loss price is low minus stop loss value, short stop loss price is high plus stop loss value.

Advantage Analysis

The biggest advantage of this strategy is its simplicity, requiring tracking of only one stop loss without needing to consider entry and exit point selections. Flexible setting of stop loss value also makes its application scope wider.

Compared with fixed stop loss, the trailing stop loss it employs can lock in larger profits while also reducing the probability of stop loss being hit. Reversing positions each time stop loss is triggered allows capturing price reversal opportunities.

Risk Analysis

The main risks of this strategy may come from improper stop loss value setting. Overly large stop loss value may lead to magnified losses, while overly small value may cause frequent stop loss triggering. This requires adaptive optimization based on market conditions.

Another risk is inaccurate directional judgment after stop loss trigger when reversing positions, thus missing price reversal chances or increasing losses. This needs combining trend and support/resistance analysis to determine optimal reversal timing.

Optimization Directions

The strategy can be optimized in the following aspects:

  1. Add trend judgment to avoid trading against trends
  2. Optimize stop loss value calculation to make it more dynamically track the market
  3. Increase breakout validation for higher-probability reversal signals
  4. Incorporate volatility measures to find best reversal timing

Conclusion

The strategy realizes profits through a simple trailing stop loss mechanism and is easy for beginners to grasp. Compared to traditional stop loss strategies, it adds post stop loss trigger reversal positions to acquire additional gains. With continuous testing and optimization, it can become a very practical quantitative program.

Source
Pine
/*backtest
start: 2022-11-24 00:00:00
end: 2023-11-30 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy(title="Trailing SL Strategy [QuantNomad]", shorttitle = "TrailingSL [QN]", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 50)

////////////
Strategy parameters
Strategy parameters
sl_type
% SL
ATR Length
ATR Mult
Absolute SL
From Day
From Month
From Year
To Day
To Month
To Year
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)