ATR+ | Trend-Following Strategy
Aug 17, 2025

The ATR+ | Trend-Following Strategy indicator is a systematic tool designed for trend identification and risk-managed position entry using volatility-adjusted components. It combines Heikin Ashi price smoothing with an adaptive ATR trailing stop to identify robust long-only entry and exit points in various financial markets.
Usage
The strategy is primarily used for identifying and riding market trends while protecting capital through dynamic exit mechanisms.
- Trend Identification: The script uses processed price data (Heikin Ashi) compared against an EMA to filter out market noise and highlight the underlying direction.
- Entry Signals: Long signals are generated when the price source crosses above the EMA and remains above the ATR trailing stop.
- Exit Management: The strategy provides two exit layers: a trend-reversal exit triggered by the ATR trailing stop crossing the price, and an optional hard stop loss based on a percentage or fixed point value from the entry price.
- Volatility Adaptation: By adjusting the Key Value and ATR Period, users can calibrate the sensitivity of the trailing stop to suit different market regimes, such as high-volatility cryptocurrency pairs or lower-volatility traditional assets.
Details
This strategy integrates several technical analysis concepts to ensure realistic performance:
- Heikin Ashi Methodology: To prevent repainting and ensure signal stability, the script offers three calculation modes. The manual calculation provides deterministic HA values, while the
ticker.heikinashi()option uses confirmed historical bars. - ATR Trailing Stop: The stop level dynamically adjusts based on the Average True Range. It moves upward during an uptrend to lock in profits but stays flat or moves with price depending on volatility thresholds.
- Real-Price Execution: While signals can be derived from synthetic Heikin Ashi values, the stop loss and order execution are calculated using standard OHLC prices. This ensures that backtesting results reflect actual market liquidity and realistic price levels.
- Backtesting Features: The script includes a date filter for specific historical analysis and uses
fill_orders_on_standard_ohlc=trueto simulate more accurate trade executions on TradingView.
Settings
Core Strategy
- Key Value (Sensitivity): Adjusts the multiplier for the ATR trailing stop. Lower values result in a tighter stop and more signals; higher values provide more room for the trend to develop.
- ATR Period: Sets the lookback period for the Average True Range calculation.
- Heikin Ashi Method: Selects between Manual Calculation, ticker.heikinashi(), or Regular Candles for trend smoothing.
Risk Management
- Enable Stop Loss: Toggles the additional fixed/percentage-based stop loss.
- Stop Loss Type: Defines whether the stop loss is calculated as a "Percentage" or "Fixed Points" from the entry price.
- Stop Loss Value: Sets the specific percentage or point distance for the stop loss.
Visuals & Filters
- Use Date Filter: Restricts strategy execution to a specific start and end time.
- Visual Toggles: Options to show or hide buy/sell signals, the ATR trailing stop line, stop loss levels, and bar coloring.
- Show Position Info: Displays an on-chart table with real-time status, including current trend, entry price, and active stop levels.
FAQ
How do I access ATR+ | Trend-Following Strategy?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can this be used for short positions?
The current implementation is engineered specifically for long-only positions to capture upward trend momentum.
Why are the buy/sell signals different from standard candle crossovers?
The signals are derived from Heikin Ashi smoothed data and an EMA interaction, which filters out minor price fluctuations that standard candles might otherwise trigger.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.