Skip to content
All library documents

A SuperTrend Futures Strategy Using ATR-Based Trend Signals

Article SuperMind

Summary

This code implements a SuperTrend-style signal on 15-minute Bitcoin futures data. It calculates true range from each bar’s high, low, and previous close, smooths the result into an ATR, and places candidate bands around the high-low midpoint using a configurable multiplier. Trailing upper and lower bands determine a persistent trend state. When the state flips, the script closes an existing position and submits an order in the new direction, using ticker prices with a one-percent adjustment.

The excerpt identifies a backtest period and exchange, but reports no performance statistics, benchmark, or transaction-cost analysis. Important settings such as the ATR length, band multiplier, and trade volume are referenced without definitions in the shown code. The order sizing and direction handling therefore cannot be assessed fully from this excerpt, and the sizing differs between the long and short entries. The strategy is a trend-following example, not evidence that the signals are profitable or robust.

Key ideas

  • The strategy derives SuperTrend bands from an ATR calculated using high, low, and previous close.
  • It uses the midpoint of each bar’s high and low as the basis for the ATR-offset bands.
  • A change in trend state triggers closing an existing position and entering in the new direction.
  • The excerpt provides a test period and market context but no results or cost analysis.
  • Several required parameters are not defined in the shown code, limiting reproducibility and assessment.

Tags

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