Skip to content
All library documents

Linear Regression Trendline Breakouts with Stops and Position Reversals

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses a linear regression of closing prices as a moving trend reference. It opens a long when price rises beyond the line by a configurable percentage and a short when it falls below by the corresponding threshold. The implementation allows one directional position at a time and sets percentage-based stop-loss and take-profit levels. The accompanying description also presents stop-triggered reversals with increased size as a way to respond to a failed signal.

The document lists BTC/USDT futures and daily bars for a historical backtest period, and provides parameter defaults, but gives no performance statistics or results. Its stated risks include repeated false breakouts in sideways markets, sensitivity to parameters, slippage, and losses magnified by reversal sizing. The prose and code do not fully align: the reversal conditions shown compare price against stop levels in a way that may not reliably represent a stop being hit. The strategy should therefore be treated as a proposed design, not a validated result.

Key ideas

  • Linear regression of closing prices supplies the trendline used to detect breakouts.
  • A configurable percentage gap above or below the line triggers directional entries.
  • The strategy sets percentage-based exits and describes reversing with larger size after a stop.
  • The published settings specify BTC/USDT futures and daily bars but provide no outcome statistics.
  • Choppy conditions, execution slippage, parameter sensitivity, and reversal sizing can increase risk.

Tags

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