SuperTrend Entries Filtered by a Moving Average
Summary
This long-oriented strategy uses an ATR-based SuperTrend to track regime changes and a simple moving average as a directional filter. The SuperTrend bands are placed around a selected price source using an ATR multiplier and adjusted as prices evolve. A change from downtrend to uptrend can trigger a buy when the close is above the moving average. A reverse transition below the average generates a sell condition, which closes the long and also submits a short entry in the supplied code.
Inputs control ATR length and calculation method, the band multiplier, moving average length and source, and chart display features. The script also permits a date window for strategy orders. The accompanying description characterizes the average as a way to filter signals, but provides no backtest results or evidence that it reduces false entries. Although the prose describes a long strategy, the code can open short positions after sell signals, so actual behavior depends on the implementation and platform settings.
Key ideas
- ATR and a multiplier define the changing SuperTrend bands and trend state.
- A bullish trend transition generates a buy only when price is above the moving average.
- A bearish transition below the moving average produces a sell condition and closes the long position.
- The code also submits a short entry on the sell condition, despite the long-only framing in the description.
- The document provides configurable rules but no performance results for the filter.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.