ATR+ | Trend-Following Strategy

Aug 17, 2025

Static chart image
Signals
Candlestick
Moving Averages
Trailing-Stop
Volatility

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=true to 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 access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.