Type/to search

Trailing Stop Loss Percent Strategy

Common strategy
Created: 2024-02-01 11:05:36
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy is designed for a long position entry with a date-specific trigger and a trailing stop loss mechanism for risk management. It is particularly useful for traders who want to automate their entries based on specific calendar dates and manage their positions with a dynamic risk control method like a trailing stop loss.

Strategy Logic

The strategy first takes input of specific entry dates, including month and day, then calculates the accurate entry timestamp based on these dates. It also inputs the percentage parameter for trailing stop loss.

On the entry date, the strategy will open a long position. At the same time, it records the highest price (highestPrice) and stop loss price (stopLoss). The highestPrice keeps updating over time, while the stopLoss trails it by a certain percentage downwards.

If the price falls below the stopLoss, the position will be closed. Otherwise, the position remains open, and the stopLoss keeps trailing the highestPrice to lock in profits and control risk.

Advantage Analysis

The main advantages of this strategy are:

  1. Automated entry based on specific dates. Suitable for strategies trading around significant events.
  2. Applies trailing stop loss to dynamically lock in profits and effectively manage risks.
  3. Stop loss set as percentage, simple and intuitive to operate. Customizable loss range.
  4. Allows long-term holding to maximize upside potential.

Risk Analysis

There are also some risks:

  1. Risk of stop loss failure. If price drops sharply below stop loss briefly then bounces back, the position may get stopped out and fail to capture the rebound.
  2. No limit on maximum loss. If trailing stop loss percentage set too wide, max loss can exceed expectations.

Possible improvements:

  1. Combine other indicators to pause trailing stop when market faces correction, avoiding failure.
  2. Set stop loss percentage carefully, usually under 10%. Or set maximum tolerable loss.

Optimization

Possible optimization directions:

  1. Add profit taking mechanisms. When price rises 50% etc, take partial or full profits.
  2. Optimize trailing width based on market regime signals from indices. Widen when market consolidating.
  3. Enhance position sizing. Consider pyramiding when new highs breakout for greater profits.

Conclusion

This strategy provides automated date-based entry and dynamic risk management via trailing stop loss. Simple and intuitive to operate, suitable for long-term holdings. Further optimizations can make it a very practical quant trading strategy.

Source
Pine
/*backtest
start: 2024-01-24 00:00:00
end: 2024-01-31 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy(title="Trailing Stop Loss Percent",
     overlay=true, pyramiding=1)
Strategy parameters
Strategy parameters
Entry Day
Entry Month
Entry Year
Trailing Stop Loss (%)
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)