OPEN-SOURCE SCRIPT
Atualizado ATR Stop Loss Calculator

This indicator automatically calculates your Stop Loss and Take Profit levels for both Long and Short trades on every candle, using the Average True Range (ATR) as the foundation for risk measurement.
Instead of guessing where to place your stop, this tool gives you a mathematically calculated level based on the actual volatility of the market you are trading. If the market is moving fast and ATR is high, your stop will be wider. If the market is quiet and ATR is low, your stop will be tighter. This keeps your risk decisions consistent and objective across all market conditions.
How it works
The entry point is taken from the open of each candle. The ATR is calculated over a configurable period (default 14) and multiplied by your chosen multiplier to determine the risk distance. The Stop Loss is placed that distance above the entry for Short trades and below the entry for Long trades. The Take Profit is then placed at your chosen Risk:Reward multiple in the opposite direction.
What the table shows
The table in the top right corner displays both Long and Short scenarios side by side on every candle so you can immediately see your levels regardless of which direction you are considering. It shows Entry, Stop Loss, Take Profit, Risk in points, Reward in points, and the current ATR value.
Inputs
ATR Period — the number of candles used to calculate the Average True Range. Default is 14.
ATR Multiplier — how many times the ATR to use as your risk distance. Use 1.0 for a tight stop in a trending market, 1.5 for normal conditions, and 2.0 for choppy or volatile markets.
Risk:Reward Target — your desired R multiple for the Take Profit. Default is 3 for a 1:3 Risk:Reward ratio.
Who this is for
This indicator is built for traders who want to remove emotion from their stop placement and base every trade decision on real market volatility. It works on any asset and any timeframe including Forex, Gold, Crypto, Indices, and Stocks.
Instead of guessing where to place your stop, this tool gives you a mathematically calculated level based on the actual volatility of the market you are trading. If the market is moving fast and ATR is high, your stop will be wider. If the market is quiet and ATR is low, your stop will be tighter. This keeps your risk decisions consistent and objective across all market conditions.
How it works
The entry point is taken from the open of each candle. The ATR is calculated over a configurable period (default 14) and multiplied by your chosen multiplier to determine the risk distance. The Stop Loss is placed that distance above the entry for Short trades and below the entry for Long trades. The Take Profit is then placed at your chosen Risk:Reward multiple in the opposite direction.
What the table shows
The table in the top right corner displays both Long and Short scenarios side by side on every candle so you can immediately see your levels regardless of which direction you are considering. It shows Entry, Stop Loss, Take Profit, Risk in points, Reward in points, and the current ATR value.
Inputs
ATR Period — the number of candles used to calculate the Average True Range. Default is 14.
ATR Multiplier — how many times the ATR to use as your risk distance. Use 1.0 for a tight stop in a trending market, 1.5 for normal conditions, and 2.0 for choppy or volatile markets.
Risk:Reward Target — your desired R multiple for the Take Profit. Default is 3 for a 1:3 Risk:Reward ratio.
Who this is for
This indicator is built for traders who want to remove emotion from their stop placement and base every trade decision on real market volatility. It works on any asset and any timeframe including Forex, Gold, Crypto, Indices, and Stocks.
Notas de Lançamento
This one measure the entry from the candle closeScript de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.