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. اقرأ المزيد في شروط الاستخدام.