Skip to content
All library documents

SMA and Rolling Regression Trendline Signals for Long Entries and Exits

Article Strategy library · Author: ChaoZhang

Summary

This strategy combines a simple moving average with a rolling linear regression line calculated over a selected window. The description presents a long entry when the close is above both reference lines and an exit when it falls below both, using the pair as filters for trend or channel movement. It also discusses configurable periods and dates, possible stop rules, and adding other indicators as filters.

The document gives BTC/USDT futures backtest settings but reports no performance metrics or evidence of profitability. It notes that poor parameter choices can lead to missed trades or false signals, and that signals may be less reliable in volatile or sideways conditions. There is also a material inconsistency: the source code’s entry condition requires the close to be above the SMA but below the trendline, while its exit condition requires the opposite. These conditions differ from the written description, and the date inputs do not appear to restrict trading in the supplied code. The actual logic needs clarification before interpreting any backtest.

Key ideas

  • The described method combines a simple moving average with a rolling least-squares trendline.
  • The prose specifies long entries above both lines and exits below both lines.
  • The source code uses opposing SMA and trendline conditions, so it does not implement the prose as stated.
  • No performance results are provided despite the BTC/USDT futures backtest configuration.
  • False breakouts and reduced signal reliability in volatile or sideways markets are stated risks.

Tags

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