OPEN-SOURCE SCRIPT
stelaraX - Risk Calculator

stelaraX – Risk Calculator
stelaraX – Risk Calculator is a trade planning and risk management indicator that visualizes entry, stop loss, and up to three take profit levels directly on the chart. The script calculates risk amount and position size based on account size and risk percentage, and it supports both long and short trade scenarios.
For advanced AI-based chart analysis and automated trade planning tools, visit stelarax.com
Core logic
The indicator uses a manual signal lock to fix a trade setup:
* enable the signal lock
* input the entry price
* input the stop loss price
* select trade direction (Long or Short)
The script validates the trade direction:
* for Long, stop loss must be below entry
* for Short, stop loss must be above entry
Risk is calculated using account size and risk percentage:
* risk amount in currency is computed from account size and risk percent
* position size is derived from risk amount divided by the stop loss distance
Take profit levels are calculated using risk-to-reward multiples:
* TP1, TP2, TP3 can be enabled or disabled independently
* each TP level is calculated as a multiple of the stop loss distance based on the selected R:R value
Visualization
When the signal is active and valid, the indicator draws:
* entry line with price label
* stop loss line with risk amount label
* up to three take profit lines with R-multiple, price, and projected profit labels
* optional risk zone box between entry and stop loss
* optional info panel summarizing the full trade setup
Line length and display elements can be configured.
Alerts
Alert conditions are available for:
* entry level reached
* TP1 reached
* TP2 reached
* TP3 reached
* stop loss reached
Visual markers can also be displayed when any level is hit.
Use case
This indicator is intended for:
* fixed trade planning with manual entry and stop levels
* position sizing based on account risk
* defining multiple take profit targets using R:R
* visualizing risk and reward directly on the chart
* creating alert-based trade management workflows
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
stelaraX – Risk Calculator is a trade planning and risk management indicator that visualizes entry, stop loss, and up to three take profit levels directly on the chart. The script calculates risk amount and position size based on account size and risk percentage, and it supports both long and short trade scenarios.
For advanced AI-based chart analysis and automated trade planning tools, visit stelarax.com
Core logic
The indicator uses a manual signal lock to fix a trade setup:
* enable the signal lock
* input the entry price
* input the stop loss price
* select trade direction (Long or Short)
The script validates the trade direction:
* for Long, stop loss must be below entry
* for Short, stop loss must be above entry
Risk is calculated using account size and risk percentage:
* risk amount in currency is computed from account size and risk percent
* position size is derived from risk amount divided by the stop loss distance
Take profit levels are calculated using risk-to-reward multiples:
* TP1, TP2, TP3 can be enabled or disabled independently
* each TP level is calculated as a multiple of the stop loss distance based on the selected R:R value
Visualization
When the signal is active and valid, the indicator draws:
* entry line with price label
* stop loss line with risk amount label
* up to three take profit lines with R-multiple, price, and projected profit labels
* optional risk zone box between entry and stop loss
* optional info panel summarizing the full trade setup
Line length and display elements can be configured.
Alerts
Alert conditions are available for:
* entry level reached
* TP1 reached
* TP2 reached
* TP3 reached
* stop loss reached
Visual markers can also be displayed when any level is hit.
Use case
This indicator is intended for:
* fixed trade planning with manual entry and stop levels
* position sizing based on account risk
* defining multiple take profit targets using R:R
* visualizing risk and reward directly on the chart
* creating alert-based trade management workflows
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.