OPEN-SOURCE SCRIPT
Risk-Managed Strategy

Risk-Managed Strategy is a complete algorithmic trading framework that blends multiple technical systems—RSI, MACD, EMA crossover, Bollinger Bands, and SuperTrend—into a unified signal engine.
The script dynamically calculates position size based on capital, risk percentage, ATR-based stop loss, and reward-ratio targets.
It features:
-Multi-indicator signal voting (BUY / SELL / NEUTRAL)
- Dynamic capital tracking across trades
- Automatic position sizing based on risk amount
- Auto-generated Stop Loss and Take Profit using recent highs/lows
- On-chart SL, TP, and CMP plotting for clarity
This strategy is designed for traders who want a professional, rule-based system that balances accuracy, risk control, and automation.
Disclaimer:
The information provided is for educational and informational purposes only. It does not constitute financial or investment advice. Trading and investing in stocks involves risk, including the possible loss of capital. Any decisions to buy, sell, or hold securities are the sole responsibility of the reader. Past performance is not indicative of future results. Always do your own research and, if necessary, consult with a licensed financial advisor before making investment decisions.
The script dynamically calculates position size based on capital, risk percentage, ATR-based stop loss, and reward-ratio targets.
It features:
-Multi-indicator signal voting (BUY / SELL / NEUTRAL)
- Dynamic capital tracking across trades
- Automatic position sizing based on risk amount
- Auto-generated Stop Loss and Take Profit using recent highs/lows
- On-chart SL, TP, and CMP plotting for clarity
This strategy is designed for traders who want a professional, rule-based system that balances accuracy, risk control, and automation.
Disclaimer:
The information provided is for educational and informational purposes only. It does not constitute financial or investment advice. Trading and investing in stocks involves risk, including the possible loss of capital. Any decisions to buy, sell, or hold securities are the sole responsibility of the reader. Past performance is not indicative of future results. Always do your own research and, if necessary, consult with a licensed financial advisor before making investment decisions.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.