ATR SL/TP Plotter

Apr 29, 2026

Static chart image
Dashboard
Money Management
Volatility

The ATR SL/TP Plotter indicator is a visual risk-management tool that converts volatility data and user-defined risk parameters into a comprehensive trade plan including entry, stop loss, and tiered take-profit levels. It enables traders to automate position sizing and risk-to-reward visualization directly on the chart based on current market dynamics.

Usage

The Usage section describes how the script can be used to plan trades and manage risk. Users can apply the indicator to any liquid market to establish a volatility-adjusted trade framework.

  • Direction Logic: By default, the tool uses an EMA(20) and EMA(50) crossover from the previous bar to determine trade bias (Long or Short). This can be manually overridden in the settings to align with personal analysis.
  • Risk Management: Users input their account balance and risk percentage (e.g., 1%). The tool then calculates the specific position size required so that hitting the Stop Loss results in exactly that loss amount.
  • Target Scaling: The script plots three distinct Take Profit (TP) levels. Traders can use these for scaling out of positions. The visual R:R box provides an immediate geometric representation of the potential reward versus the risk for the first target.
  • Volatility Adaptation: Because the levels are derived from the Average True Range (ATR), the plan automatically widens during high volatility and tightens during quiet periods, ensuring the stop loss is relative to current price action.

Details

The script utilizes the ta.atr() function to measure market volatility over a specified period. The levels are calculated as follows:

  • Stop Loss (SL): Entry ± (ATR × Multiplier)
  • Take Profits (TP1-3): Entry ± (ATR × Multipliers)

To ensure the indicator remains non-repainting for direction, the EMA state is evaluated on the previously closed bar (close[1]). However, the SL/TP levels and position sizing update in real-time with the current price to provide accurate data for immediate execution. The position size calculation is unit-neutral; on Forex, it represents units, while on Equities, it represents share count.

Settings

Trade Setup

  • Direction: Select between "Auto" (EMA-based), "Long", or "Short" overrides.
  • Show on: Choose to display the plan on only the "Last Bar" or across the "Last N Bars" for historical context.
  • N Bars: The number of recent bars to show levels on when historical mode is active.

ATR Settings

  • ATR Period: The lookback length for the volatility calculation (default is 14).
  • SL Multiplier: Scalar for the Stop Loss distance.
  • TP1 / TP2 / TP3 Multiplier: Individual scalars for the three Take Profit targets.

Position Sizing

  • Account Balance: The total equity used for size calculations.
  • Risk %: The percentage of the balance the user is willing to lose on the trade.

Display

  • Table Position / Size: Adjusts the location and scale of the on-screen dashboard.
  • Show R:R Box: Toggles the shaded risk/reward zones.
  • Show TP/SL Lines: Toggles the horizontal price level lines.

FAQ

How does the tool calculate position size? The script divides the currency amount you are risking (Balance × Risk %) by the distance between the entry price and the Stop Loss price.

Does this indicator execute trades automatically? No, this is a visualization and planning tool. It provides the levels and sizing data, but the user must manually enter orders with their broker.

How do I get access to the ATR SL/TP Plotter? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

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.