Skip to content
All library documents

Trendline Breakout Entries Filtered by Supertrend

Article Strategy library · Author: theone_Raj

Summary

This BTC perpetual futures strategy combines pivot-based trendlines with a Supertrend direction filter. It estimates trendline slope using ATR, standard deviation, or a linear-regression calculation, then tracks closes that cross the projected upper or lower trendline. A new upward break can trigger a long when Supertrend is bullish; a downward break can trigger a short when Supertrend is bearish. Positions can exit on an opposing trendline signal or a Supertrend reversal.

The script also supports percentage-based or manually specified stop-loss and take-profit levels, and plots entry, exit, and direction series for API use. Its inputs include swing lookback, slope multiplier, and Supertrend parameters. The supplied material is code rather than a results report: it states no test period performance, fees beyond a zero commission setting, slippage, or robustness evidence. The trendline and Supertrend calculations therefore need independent review and realistic testing before drawing conclusions about effectiveness.

Key ideas

  • Pivot highs and lows anchor projected trendlines whose slopes can be calculated by three selectable methods.
  • Trendline breaks generate directional signals only when they agree with the Supertrend direction.
  • Opposing break signals or a Supertrend reversal can close an open position.
  • Percentage or manual price levels can define stop losses and take profits.
  • The script exposes signal and trend series for API workflows but provides no evidence of strategy performance.

Tags

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