OPEN-SOURCE SCRIPT
XAUUSD Lot Size Calculator + RSI (Yoothobbiz)

This indicator is designed for Gold traders on the 5-minute timeframe (M5) who want a clear and editable lot size, stop loss, and take profit calculator directly on their chart.
✨ Features:
📌 Dynamic Lot Size Calculation – based on account capital, chosen risk %, and stop loss distance.
⚖️ Risk/Reward Management – automatically displays TP level using a customizable risk/reward ratio (e.g., 1:2, 1:3, etc.).
🛑 Stop Loss in Points & Price – calculates SL from recent M5 highs/lows, including spread.
🎯 Take Profit in Price & Points – automatically adjusted to your risk/reward ratio.
💵 Risk in USD – instantly shows how much capital is at risk per trade.
🕒 Custom Time Zone Support – displays the real trading time (default UTC-4 for New York), fully editable for any user.
⏱ Timeframe Label – clearly shows the working timeframe (M5 by default).
🎨 Fully Editable Display Panel:
Position (6 corners available).
Font family, size, style (bold/italic).
Text and background colors.
Adjustable spacing between lines.
🔑 How to Use:
Set your capital and risk % in the settings.
Adjust spread (in points) if needed.
Choose your risk/reward ratio.
The panel will display:
Recommended lot size for XAUUSD
Stop loss (price + points)
Take profit (price + ratio)
Risk in $
Timeframe & real-time clock
📍 Notes:
Optimized for XAUUSD (Gold) and the 5M timeframe.
Works on any asset/timeframe, but SL logic is based on M5 candle highs/lows.
Ideal for traders who want a fast and disciplined risk management tool right on their chart.
✨ Features:
📌 Dynamic Lot Size Calculation – based on account capital, chosen risk %, and stop loss distance.
⚖️ Risk/Reward Management – automatically displays TP level using a customizable risk/reward ratio (e.g., 1:2, 1:3, etc.).
🛑 Stop Loss in Points & Price – calculates SL from recent M5 highs/lows, including spread.
🎯 Take Profit in Price & Points – automatically adjusted to your risk/reward ratio.
💵 Risk in USD – instantly shows how much capital is at risk per trade.
🕒 Custom Time Zone Support – displays the real trading time (default UTC-4 for New York), fully editable for any user.
⏱ Timeframe Label – clearly shows the working timeframe (M5 by default).
🎨 Fully Editable Display Panel:
Position (6 corners available).
Font family, size, style (bold/italic).
Text and background colors.
Adjustable spacing between lines.
🔑 How to Use:
Set your capital and risk % in the settings.
Adjust spread (in points) if needed.
Choose your risk/reward ratio.
The panel will display:
Recommended lot size for XAUUSD
Stop loss (price + points)
Take profit (price + ratio)
Risk in $
Timeframe & real-time clock
📍 Notes:
Optimized for XAUUSD (Gold) and the 5M timeframe.
Works on any asset/timeframe, but SL logic is based on M5 candle highs/lows.
Ideal for traders who want a fast and disciplined risk management tool right on their chart.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.