OPEN-SOURCE SCRIPT
Risk Co-Pilot | Position Sizing & Volatility Risk

A position-sizing and volatility-risk tool. You enter your account size and risk percent per trade; it computes how much to risk and how large a position that implies, plus a volatility state light. It does NOT generate buy or sell signals.
What it shows
- Risk $ for your chosen account size and risk percent
- ATR-based stop distance and the resulting long/short stop levels
- Position size in units so that hitting the stop loses exactly your chosen risk percent
- Volatility risk state (Normal / Elevated / Caution) from the ATR percentile, a reminder to size down when volatility is high
Honest by design
- No buy/sell signals, no auto-execution. It sizes risk; you decide and execute.
- Non-repainting: every value is a function of confirmed bars.
- The position size assumes a 1:1 price-to-PnL instrument. Adjust for pip value (forex) or point value (futures).
Open-source and MIT licensed.
Disclaimer: impersonal educational and risk tool. This is not investment advice, not a personalised recommendation, and carries no performance guarantee. Past results do not predict future results. You are solely responsible for your own trading decisions.
What it shows
- Risk $ for your chosen account size and risk percent
- ATR-based stop distance and the resulting long/short stop levels
- Position size in units so that hitting the stop loses exactly your chosen risk percent
- Volatility risk state (Normal / Elevated / Caution) from the ATR percentile, a reminder to size down when volatility is high
Honest by design
- No buy/sell signals, no auto-execution. It sizes risk; you decide and execute.
- Non-repainting: every value is a function of confirmed bars.
- The position size assumes a 1:1 price-to-PnL instrument. Adjust for pip value (forex) or point value (futures).
Open-source and MIT licensed.
Disclaimer: impersonal educational and risk tool. This is not investment advice, not a personalised recommendation, and carries no performance guarantee. Past results do not predict future results. You are solely responsible for your own trading decisions.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน