Skip to content
All library documents

ATR Supertrend with CCI Thresholds for Trend Direction

Article ProRealCode

Summary

This indicator combines an ATR-based trailing level with the Commodity Channel Index (CCI) to mark bullish and bearish states. When CCI is above its configurable threshold, the bullish level is set below the low by an ATR amount and is prevented from falling while the condition persists. When CCI is below the threshold, the bearish level is set above the high and is prevented from rising. The threshold crossings transfer the prior trend level to the opposite state, and chart markers indicate switches.

The settings expose the CCI period, ATR period, and activation threshold. The document provides implementation code translated from an MT5 version, but no backtest, market, or timeframe evidence. It also does not explain execution rules, position sizing, or risk controls. The indicator is therefore a signal and visualization method; its usefulness as a trading strategy would need separate testing, including checks for initialization and behavior around threshold crossings.

Key ideas

  • The indicator uses CCI relative to a configurable threshold to define bullish and bearish conditions.
  • ATR sets the distance between price and the active Supertrend level.
  • The bullish level is constrained from moving lower while the bullish condition continues.
  • The bearish level is constrained from moving higher while the bearish condition continues.
  • The document provides code but no performance evidence or complete trading rules.

Tags

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