Type/to search

Dynamic Trailing Stop Loss Strategy

Common strategy
Created: 2023-12-21 15:58:54
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy determines the trend direction based on daily candlesticks, and uses the new high or low points formed by 15-minute candlesticks as stop loss price or trailing stop loss price, so as to dynamically adjust stop loss and lock in more profits.

Strategy Logic

  1. Compare closing price of daily candlesticks with highest and lowest price of previous daily candlestick to determine the trend direction. If closing price is higher than previous day's highest price, it is defined as an uptrend. If closing price is lower than previous day's lowest price, it is defined as a downtrend.

  2. When in an uptrend, go long when the closing price of the 15-minute candlestick is higher than the highest price of the previous 15-minute candlestick. When in a downtrend, go short when the closing price of the 15-minute candlestick is lower than the lowest price of the previous 15-minute candlestick.

  3. Set the lowest price of the previous 15-minute candlestick as the stop loss price after going long. Set the highest price of the previous 15-minute candlestick as the stop loss price after going short.

  4. When the 15-minute candlestick makes a new high or low again, adjust the stop loss price accordingly. Adjust to the new low after going long. Adjust to the new high after going short. This realizes dynamic trailing stop loss.

Advantage Analysis

The biggest advantage of this strategy is that it can dynamically adjust the stop loss price. While ensuring risk control, it maximizes profit taking and reduces the probability of stop loss being hit.

Specifically advantages include:

  1. Trend operation based judgments can timely determine market trends and choose the right trading direction.

  2. 15-minute timeframe trading allows frequent entries and exits to capture more opportunities.

  3. Dynamic stop loss adjustment based on new highs or lows reduces risks of stop loss being hit.

  4. Reasonable stop loss positioning largely avoids unnecessary losses.

Risk Analysis

The main risk of this strategy comes from errors in trend judgments. Specific risks include:

  1. Incorrect daily trend judgment may lead to wrong trade direction.

  2. Prices may fluctuate violently in the short term, increasing probability of 15-minute stop loss being hit.

  3. Improper identification of trend reversal points may lead to losses.

Corresponding solutions:

  1. Add indicators from other timeframes for comprehensive judgments to avoid reliance on just one timeframe.

  2. Evaluate market volatility and relax stop loss range appropriately during high volatility.

  3. Add trend reversal point identification mechanism to close positions timely before reversals.

Optimization Directions

There is still room for further optimization:

  1. Add other timeframe indicators to optimize trend capturing.

  2. Test different stop loss ratio settings to find optimal parameters.

  3. Add volume indicators to avoid errors from volume divergence.

  4. Add trend reversal mechanisms to optimize exit points.

  5. Evaluate widening Trailing Stop price intervals to further reduce risks of stop loss being hit.

Summary

The overall performance of this strategy is good. The logic is clear and easy to understand. It has advantages like dynamic stop loss adjustment, frequent trading, and trading along trends. It can effectively control risks and lock in profits, and is worth further testing and optimization. But there is still room for improvement. It is recommended to improve from aspects like comprehensive judgment from multiple angles, parameter optimization, adding trend reversal identification mechanisms, etc, to further strengthen the stability and profitability of the strategy.

Source
Pine
/*backtest
start: 2023-12-13 00:00:00
end: 2023-12-15 02:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Anand's Strategy", overlay=true)

// Get the high and low of the previous day's candle
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)