OPEN-SOURCE SCRIPT
Telah dikemas kini 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.
Nota Keluaran
This one measure the entry from the candle closeSkrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.