OPEN-SOURCE SCRIPT
Risk & Position-Size Calculator | Falcon AI

Works out how many contracts to trade so that being stopped out costs the dollar amount you actually chose to risk.
Enter your account size and risk percentage, set the stop as either a manual point distance or an ATR multiple, and the script returns the contract count. It auto-detects the point value of the symbol you are on, so you are not hand-converting ticks to dollars or mixing up micro and full-size contract multipliers, which is where most sizing mistakes come from.
It also shows a guardrail panel for anyone trading a funded or evaluation account: how many consecutive losing trades at your current size before you hit the daily-loss limit, and how many before a trailing drawdown is breached. Those two numbers are usually the difference between a plan that survives a bad day and one that does not.
Settings: account size, risk per trade (%), stop mode (manual points or ATR-based), ATR length and multiple, max daily loss, trailing drawdown, panel position, text size, accent colour, optional prior-day high/low levels.
This script does NOT place trades, does NOT backtest, and contains no entry or exit logic. It is a calculator that reads your inputs and does the arithmetic. Your entry, your risk.
Educational tool only. Not financial advice. Correct position sizing does not prevent losses, it only makes the size of them deliberate.
Enter your account size and risk percentage, set the stop as either a manual point distance or an ATR multiple, and the script returns the contract count. It auto-detects the point value of the symbol you are on, so you are not hand-converting ticks to dollars or mixing up micro and full-size contract multipliers, which is where most sizing mistakes come from.
It also shows a guardrail panel for anyone trading a funded or evaluation account: how many consecutive losing trades at your current size before you hit the daily-loss limit, and how many before a trailing drawdown is breached. Those two numbers are usually the difference between a plan that survives a bad day and one that does not.
Settings: account size, risk per trade (%), stop mode (manual points or ATR-based), ATR length and multiple, max daily loss, trailing drawdown, panel position, text size, accent colour, optional prior-day high/low levels.
This script does NOT place trades, does NOT backtest, and contains no entry or exit logic. It is a calculator that reads your inputs and does the arithmetic. Your entry, your risk.
Educational tool only. Not financial advice. Correct position sizing does not prevent losses, it only makes the size of them deliberate.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
📊 Falcon AI — World's most transparent algo trading service ·Automated Futures strategies · 14-day Setup Guarantee. Free community & live results → thefalconai.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
📊 Falcon AI — World's most transparent algo trading service ·Automated Futures strategies · 14-day Setup Guarantee. Free community & live results → thefalconai.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.