OPEN-SOURCE SCRIPT
GOLD SL CANDLEPIPS

🟡 GOLD SL Distance + Position Size (500 $ Fixed Risk)
This indicator displays two essential pieces of information directly on the chart:
1. The Stop-Loss distance — measured from the candle close to the end of the wick.
• For long trades, the distance is calculated from the close to the low.
• For short trades, it’s from the high to the close.
• The result is shown as a clean numeric value, placed just above or below each candle, without any lines or labels cluttering the chart.
2. The required position size (in lots) to risk a fixed amount of 500 USD on that distance.
• This script includes a GOLD preset, based on the standard value of 10 USD per point per lot.
• The calculation follows this rule:
Lots = round(500 / (Distance_in_points × 10))
→ Equivalent to Lots = round(50 / Stop_in_points).
• Example:
• If the wick is 5 points, the script shows “5 | 10” → 5 pt stop = 10 lots for a 500 USD risk.
• If the wick is 8 points, it shows “8 | 6”, matching the official GOLD risk table.
⸻
⚙️ Main Features
• Works with Points, Ticks, or Pips (unit selectable).
• Shows both Stop-Loss distance and corresponding lot size near the candle.
• Fully customizable colors, font size, and text transparency.
• Offsets allow you to move the numbers vertically or horizontally on the chart.
• Option to display values for the current candle only, or for the last N candles.
• The GOLD preset can be disabled to use a custom value per unit (e.g., $/pip/lot, $/tick/lot).
⸻
🧠 Ideal Use Case
This tool is designed for Gold (XAU/USD) traders who want to:
• Instantly see their Stop-Loss distance in real time,
• And know exactly how many lots to use to maintain a consistent 500 USD risk per trade.
It’s a clean, minimalist money-management indicator that helps you stay precise, consistent, and disciplined in your risk control — without leaving the chart.
This indicator displays two essential pieces of information directly on the chart:
1. The Stop-Loss distance — measured from the candle close to the end of the wick.
• For long trades, the distance is calculated from the close to the low.
• For short trades, it’s from the high to the close.
• The result is shown as a clean numeric value, placed just above or below each candle, without any lines or labels cluttering the chart.
2. The required position size (in lots) to risk a fixed amount of 500 USD on that distance.
• This script includes a GOLD preset, based on the standard value of 10 USD per point per lot.
• The calculation follows this rule:
Lots = round(500 / (Distance_in_points × 10))
→ Equivalent to Lots = round(50 / Stop_in_points).
• Example:
• If the wick is 5 points, the script shows “5 | 10” → 5 pt stop = 10 lots for a 500 USD risk.
• If the wick is 8 points, it shows “8 | 6”, matching the official GOLD risk table.
⸻
⚙️ Main Features
• Works with Points, Ticks, or Pips (unit selectable).
• Shows both Stop-Loss distance and corresponding lot size near the candle.
• Fully customizable colors, font size, and text transparency.
• Offsets allow you to move the numbers vertically or horizontally on the chart.
• Option to display values for the current candle only, or for the last N candles.
• The GOLD preset can be disabled to use a custom value per unit (e.g., $/pip/lot, $/tick/lot).
⸻
🧠 Ideal Use Case
This tool is designed for Gold (XAU/USD) traders who want to:
• Instantly see their Stop-Loss distance in real time,
• And know exactly how many lots to use to maintain a consistent 500 USD risk per trade.
It’s a clean, minimalist money-management indicator that helps you stay precise, consistent, and disciplined in your risk control — without leaving the chart.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.