OPEN-SOURCE SCRIPT
Telah dikemas kini Net RR Calculator

Net RR Calculator โ Risk/Reward Calculator with Net Commission.
A precision risk/reward tool for long and short positions that goes beyond structural RR by calculating your real, net RR after trading fees.
How it works:
Click three times on the chart โ entry, stop loss, and take profit โ and the indicator instantly draws your risk/reward zones and displays a full breakdown of the trade.
What it calculates:
- Structural RR (raw ratio without fees)
- Net RR (actual ratio after open & close commissions)
- Position size based on your deposit and risk percentage
- Commission cost for both winning and losing scenarios
- Net profit and risk amount in your chosen currency
Key features:
- Automatic Long / Short detection based on stop placement
- Separate commission inputs for open and close (maker/taker friendly)
- Supports USD, EUR, RUB and USDT display
- Fully customizable zone colors, width and decimal precision
- Clean, non-intrusive overlay with dark-themed labels
Who it's for:
Traders who want to see the true cost of a trade before entering โ accounting for exchange fees that silently erode your RR on every position.
A precision risk/reward tool for long and short positions that goes beyond structural RR by calculating your real, net RR after trading fees.
How it works:
Click three times on the chart โ entry, stop loss, and take profit โ and the indicator instantly draws your risk/reward zones and displays a full breakdown of the trade.
What it calculates:
- Structural RR (raw ratio without fees)
- Net RR (actual ratio after open & close commissions)
- Position size based on your deposit and risk percentage
- Commission cost for both winning and losing scenarios
- Net profit and risk amount in your chosen currency
Key features:
- Automatic Long / Short detection based on stop placement
- Separate commission inputs for open and close (maker/taker friendly)
- Supports USD, EUR, RUB and USDT display
- Fully customizable zone colors, width and decimal precision
- Clean, non-intrusive overlay with dark-themed labels
Who it's for:
Traders who want to see the true cost of a trade before entering โ accounting for exchange fees that silently erode your RR on every position.
Nota Keluaran
Release Notes โ v1.1โถ NEW: Position sizing display
Two new lines added to the main info panel: Position โ trade size in the selected deposit currency (USDT / USD / EUR / RUB), and Quantity โ number of units of the chart's base asset (e.g. 0.5066 GOLD, 12 AAPL, 0.0234 BTC). The asset name is taken automatically from the chart symbol via syminfo.basecurrency, with a ticker fallback for stocks. Quantity formatting adapts to the value: 2 decimals for โฅ100 units, 4 for 1โ100, 6โ8 for fractional crypto sizes.
โถ NEW: Toggle for the position block
"Show position size (currency + asset quantity)" checkbox added in the Visuals group. Disable it if you only need RR / PnL info.
โถ CHANGE: Position sizing now includes commissions inside the risk budget
Position size is now calculated so that the actual loss at stop loss โ price move plus open and close commissions โ equals the configured risk % of the deposit in full, rather than only the price-move loss as before. The "Risk: -X USDT" line now reflects the true maximum loss from the account. Structural RR and Net RR ratios are unchanged โ only the position-sizing formula was updated.
โถ MINOR: Added division-by-zero guards for qty and Net RR when the entry / SL / TP points have not yet been placed on the chart.
Nota Keluaran
Release Notes โ v1.2โถ TWEAK: Added breathing room between the chart and the risk/reward zones
The risk and reward zones now start 5 bars to the right of the current bar instead of beginning right at it, matching the existing 5-bar gap between the zones and the info panel on the right. The result is symmetric padding around the tool: chart โ 5 bars โ zones โ 5 bars โ info panel. Zone width and info-panel placement are unchanged.
Nota Keluaran
Release Notes โ v1.3โบ NEW: Added required leverage to the info panel
The info panel now shows the required leverage directly below the Quantity line. Leverage is calculated as position size divided by deposit (e.g. a $5 000 position on a $1 000 deposit = 5x). The value updates automatically alongside all other position metrics. Visible only when "Show position size" is enabled.
โบ TWEAK: Updated tooltip for "Show position size"
The tooltip now mentions leverage in addition to currency amount and asset quantity, reflecting the new info panel output.
Nota Keluaran
Release Notes โ v1.4โถ NEW: Added "Account Balance" field with toggle for real-leverage calculation
A new "Account Balance" input has been added below "Trading Deposit", controlled by a "Use Account Balance" checkbox (disabled by default). Enable it when your real account balance is smaller than the trading deposit you size positions against โ leverage will then be calculated as position size divided by the account balance, reflecting the actual margin requirement on the exchange (e.g. a 692.71 USDT position on a 300 USDT real balance = 2.31x). When the checkbox is off, leverage continues to use the trading deposit as before.
โถ TWEAK: Renamed "Deposit" to "Trading Deposit"
The primary capital input has been renamed to "Trading Deposit" to make its role explicit: it is the notional amount used to size positions and calculate the risk percentage, which may differ from the actual funds on the account. All risk calculations remain unchanged โ only the label has been clarified.
โถ TWEAK: Info panel now reflects both deposit and balance
The info panel always shows "Trading Deposit". When "Use Account Balance" is enabled, an additional "Account Balance" line appears directly below it, so both the sizing base and the leverage base are visible at a glance.
Nota Keluaran
Release Notes โ v1.5โถ TWEAK: Default opacity of the Reward zone reduced from 75 to 55
The default transparency of the "Reward zone color" input has been lowered from 75 to 55, making the take-profit fill noticeably more saturated on the chart. The zone now stands out clearly against dark backgrounds without overpowering price action, improving readability when scanning multiple setups at a glance.
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.
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.