Type/to search

Single Exponential Smoothed Moving Average with Trailing Stop Loss Trend Following Strategy

Common strategy
Created: 2024-01-08 11:37:44
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy combines Single Exponential Smoothed Moving Average (SESMA) and a trailing stop loss mechanism with the Chandelier Exit to form a very stable and efficient trend following strategy. SESMA serves as the main line to identify the trend direction of prices. The trailing stop loss mechanism can effectively reduce the risk of the strategy while protecting profits.

Strategy Logic

The strategy consists of two core indicators:

  1. Single Exponential Smoothed Moving Average (SESMA): SESMA draws on the idea of EMA and improves the parameters to make the curve smoother and reduce lag. It uses the direction and level of SESMA to judge price trends.

  2. Trailing stop loss mechanism: Combined with highest price, lowest price and ATR indicator to calculate long and short stop loss lines in real time. It is a dynamic adjustable stop loss mechanism that can adjust stop loss range based on market volatility and trends. The relationship between stop loss line and price level is used to determine the timing of exit orders.

The entry signal of this strategy is triggered when price crosses over SESMA. The exit signal is generated by the stop loss lines. Option to show entry/exit markings.

Advantages of the Strategy

  1. The SESMA calculation method is improved and can effectively reduce lag and improve trend-following ability.
  2. The trailing stop loss mechanism can adjust the stop loss range according to real-time fluctuations to avoid excessively wide or too tight stop loss.
  3. Comes with visual assistances to mark Entry and Exit signals.
  4. Customizable parameters suitable for different products and parameter optimizations.

Risks and Optimization Directions

  1. Stop loss may be triggered prematurely during trend reversals. Can appropriately loosen the stop loss range.
  2. SESMA parameters can be optimized to find the best length.
  3. The period parameter of ATR can also be tested.
  4. Test the effects of showing markings.

Conclusion

This strategy integrates trend judging and risk control indicators to form a relatively robust trend following strategy. Compared to simple moving average strategies, this strategy can capture trends more flexibly while reducing drawdowns. Through parameter optimization, the strategy can achieve better results in different markets.

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


//@version=5
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © simwai
Strategy parameters
Strategy parameters
ATR Period
ATR Multiplier
Show Buy/Sell Labels ?
Show Signal Labels ?
Use Close Price for Extrema ?
Enable Rising/Decreasing Highlightning
ZLSMA Length
Offset
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)