OPEN-SOURCE SCRIPT
Algo torma RiskManager

Algo Torma RiskManager — Adjustable RR Tool
Managing risk is the most important skill in trading, yet it's the one most beginners overlook. This indicator was built specifically for novice traders who want to stay disciplined and protect their account from the start.
**What it does**
Once added to your chart, set your account size, how much you're willing to risk per trade (recommended 1%), your stop-loss distance in points, and your target risk:reward ratio. The tool then:
- Calculates your exact position size so you never risk more than your defined percentage
- Draws your entry, stop-loss, and take-profit levels directly on the chart as colored boxes and lines, scaled to your risk (red box) and reward (green box) zones
- Tracks losses across up to six trades you log manually and tells you how much of your daily loss budget remains
- Displays everything in a single on-chart info panel for quick reference
**How it works (the concepts behind the math)**
The core calculation is a standard fixed-fractional position sizing model: position size = (account size × risk %) ÷ (stop distance in points × contract size). This is the same method used by most professional risk-management plans — you decide the dollar amount you're willing to lose on a single trade, and the tool works backward from your stop distance to tell you how many contracts or units that translates to. The take-profit level is derived from your chosen risk:reward multiple applied to the same stop distance, so your boxes always reflect a consistent R-multiple rather than an arbitrary price target. The daily loss tracker simply sums the trade losses you input and compares that running total against a max-daily-loss threshold you set as a percentage of your account, flagging when you've hit your limit for the session.
**How to use it**
1. Add the indicator to your chart.
2. In settings, enter your account size, risk per trade %, and max daily loss %.
3. Enter your planned entry price (or leave at 0 to use the current price), your stop-loss distance in points, direction (Long/Short), and target R:R ratio.
4. Set the contract size for your instrument (tooltip includes common futures multipliers: MNQ, MES, NQ, MGC, GC — adjust for other instruments accordingly).
5. Optionally log losses from trades taken earlier in the session into the Daily Loss Tracker fields to see your remaining risk budget update in real time.
6. Use the on-chart boxes, lines, and info panel to confirm your position size and risk before entering a trade manually.
**Important notes**
This is a manual planning and visualization tool only. It does not generate buy or sell signals, does not analyze price action or market structure, and does not predict market direction — the Long/Short selector simply tells the tool which side of your entry to draw the stop and target on. All outputs are derived purely from the numbers you enter; the indicator performs no backtesting and makes no claims about historical or future performance.
This script is for educational and informational purposes only and does not constitute financial, investment, or trading advice. Trading involves substantial risk of loss, and you are solely responsible for your own trading decisions. Always perform your own due diligence and risk management. The author assumes no responsibility for any losses incurred through the use of this tool.
This script is open-source so you can review exactly how each calculation is performed.
Managing risk is the most important skill in trading, yet it's the one most beginners overlook. This indicator was built specifically for novice traders who want to stay disciplined and protect their account from the start.
**What it does**
Once added to your chart, set your account size, how much you're willing to risk per trade (recommended 1%), your stop-loss distance in points, and your target risk:reward ratio. The tool then:
- Calculates your exact position size so you never risk more than your defined percentage
- Draws your entry, stop-loss, and take-profit levels directly on the chart as colored boxes and lines, scaled to your risk (red box) and reward (green box) zones
- Tracks losses across up to six trades you log manually and tells you how much of your daily loss budget remains
- Displays everything in a single on-chart info panel for quick reference
**How it works (the concepts behind the math)**
The core calculation is a standard fixed-fractional position sizing model: position size = (account size × risk %) ÷ (stop distance in points × contract size). This is the same method used by most professional risk-management plans — you decide the dollar amount you're willing to lose on a single trade, and the tool works backward from your stop distance to tell you how many contracts or units that translates to. The take-profit level is derived from your chosen risk:reward multiple applied to the same stop distance, so your boxes always reflect a consistent R-multiple rather than an arbitrary price target. The daily loss tracker simply sums the trade losses you input and compares that running total against a max-daily-loss threshold you set as a percentage of your account, flagging when you've hit your limit for the session.
**How to use it**
1. Add the indicator to your chart.
2. In settings, enter your account size, risk per trade %, and max daily loss %.
3. Enter your planned entry price (or leave at 0 to use the current price), your stop-loss distance in points, direction (Long/Short), and target R:R ratio.
4. Set the contract size for your instrument (tooltip includes common futures multipliers: MNQ, MES, NQ, MGC, GC — adjust for other instruments accordingly).
5. Optionally log losses from trades taken earlier in the session into the Daily Loss Tracker fields to see your remaining risk budget update in real time.
6. Use the on-chart boxes, lines, and info panel to confirm your position size and risk before entering a trade manually.
**Important notes**
This is a manual planning and visualization tool only. It does not generate buy or sell signals, does not analyze price action or market structure, and does not predict market direction — the Long/Short selector simply tells the tool which side of your entry to draw the stop and target on. All outputs are derived purely from the numbers you enter; the indicator performs no backtesting and makes no claims about historical or future performance.
This script is for educational and informational purposes only and does not constitute financial, investment, or trading advice. Trading involves substantial risk of loss, and you are solely responsible for your own trading decisions. Always perform your own due diligence and risk management. The author assumes no responsibility for any losses incurred through the use of this tool.
This script is open-source so you can review exactly how each calculation is performed.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.