TradingView Pine Script Risk Manager v2
Smart Mode with automatic SL/TP from swing highs/lows, info panel with R:R ratio, position size and risk in USD. Free on GitHub.
The FlowTrader AI Risk Manager for TradingView is a Pine Script indicator that helps you manage your risk professionally. In Smart Mode it automatically calculates SL and TP from swing highs and lows. The info panel shows R:R ratio, position size and your risk in USD in real time.
Risk Manager Features
Smart Mode
Automatic detection of stop-loss and take-profit from swing highs and swing lows. No manual input required.
Manual Mode
Full manual control over SL and TP. Ideal for traders who want to define their own levels.
R:R Ratio Display
The info panel shows your current risk-reward ratio in real time so you only take trades with a positive R:R.
Position Size Calculator
Automatic calculation of the optimal position size based on your account and your defined risk percentage.
Risk in USD
See instantly how many USD you are risking on the trade. No mental math – the tool shows everything directly on the chart.
Chart Integration
The indicator integrates seamlessly into TradingView and shows all information directly on the chart without external tools.
How to set up the Risk Manager
Open the GitHub repository
Visit the FlowTrader AI GitHub repository and download the Pine Script code of the Risk Manager.
Open Pine Script Editor
Open the Pine Script Editor in TradingView (at the bottom of the chart) and paste the copied code.
Add indicator
Click 'Add to chart'. The Risk Manager appears immediately on your chart with the info panel.
Choose mode & trade
Choose Smart Mode for automatic SL/TP or Manual Mode for your own levels. Adjust account size and risk percentage in the settings.
Frequently Asked Questions
Is the Risk Manager really free?
Yes, the Risk Manager is completely free and open source. You can find it on GitHub without registration or payment.
Does it work with all markets?
Yes, the indicator works with forex, futures, stocks, crypto and CFDs – on all markets supported by TradingView.
How do I combine it with FlowTrader AI?
Use the Risk Manager for your entry planning in TradingView and then import your trades into FlowTrader AI for AI analysis of your trading patterns.