Skip to content
All library documents

ATR-Based Supertrend Signals for Long and Short Trades

Article Strategy library · Author: ChaoZhang

Summary

The document explains a trend-following system that switches between bullish and bearish states when price crosses trailing bands built from a price source and an ATR measure. The bands use a configurable ATR period and multiplier; the calculation can use either a standard ATR or a smoothed true-range average. A state change generates a long or short entry, with optional signal labels, highlighting, and bar coloring.

Although the prose describes a dual moving average crossover, the supplied implementation is an ATR-based Supertrend strategy, with no moving-average crossover logic. The published setup specifies daily BTC/USDT futures bars, hourly base data, and a date window in early 2023, but provides no performance results. The text notes the general lag and whipsaw risks of crossover methods; for the actual indicator, signals can also depend on ATR settings and may reverse in sideways markets. Optimization and additional filters are proposed without evidence of testing.

Key ideas

  • The source code uses ATR-based trailing bands to determine trend state.
  • A change from bearish to bullish state opens a long position, and the reverse opens a short position.
  • ATR period, multiplier, source price, and ATR calculation method are configurable.
  • The prose describes dual moving averages, but the implementation contains Supertrend logic instead.
  • The published futures backtest settings include no reported performance results.

Tags

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