Skip to content
All library documents

SMA Slope Trend Strategy with a Trailing Stop and Conditional Re-Entry

Article Strategy library · Author: ChaoZhang

Summary

This long-only trend strategy combines the slope of a simple moving average with the current price’s position relative to that average. It enters when the slope exceeds a minimum threshold and price is above the SMA. A trailing stop is intended to exit positions as price falls, while a stop-related flag governs whether a later pullback can trigger re-entry. A cross below the moving average also closes the position.

The document outlines adjustable inputs for slope measurement, average length, stop distance, and re-entry distance, and discusses risks such as false trend signals, frequent stop-outs, and losses after re-entry. It gives a short sample backtest configuration for BTC-USDT futures but no reported outcomes, so it provides no evidence of profitability. There is also a mismatch between the prose and implementation: the code checks for a pullback below the SMA by a specified percentage, while the parameter is labeled as a percentage above the SMA. The stop flag logic also merits careful review before interpreting results.

Key ideas

  • The entry signal requires both a rising SMA slope above a threshold and price above the SMA.
  • A trailing stop and a cross below the SMA are used as exit mechanisms.
  • After a stop event, a pullback condition can permit another long entry.
  • The document warns that parameter sensitivity, volatility, and false signals can impair results.
  • The sample backtest settings include no performance statistics, and the re-entry wording differs from the code.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.