OPEN-SOURCE SCRIPT
Gold Profit Target System

GOLD PROFIT TARGET SYSTEM
Track Real Profits, Exit With Confidence
Best on Daily or Weekly - copy and mod as you see fit. Have fun!
WHAT THIS INDICATOR DOES:
This indicator tracks your gold position from entry and shows color-coded profit targets as the price rises. Instead of guessing when to exit, you see exact profit levels in real-time: 1%, 2%, 3%, 4%, 5%, 10%, 15%, 20%, 25%, and 25%+.
Simple concept: BUY on the signal, SELL at YOUR chosen profit level.
HOW IT WORKS - 3 SIMPLE STEPS:
STEP 1: Wait for BUY Signal
• Green triangle (▲) appears below the composite line
• Triggered when inverse assets (DXY, rates, etc.) show strong correlation and are falling
• Entry price is automatically recorded
• Position tracking begins
STEP 2: Watch Profit Targets Appear
• As gold rises, color-coded symbols appear above the composite line
• Each symbol represents a profit milestone
• The info table shows your current profit
• You decide when to exit based on YOUR target
STEP 3: Exit at Your Chosen Level
• Conservative? Exit at 5-10%
• Moderate? Exit at 10-15%
• Aggressive? Hold for 20%+
• The indicator just shows the levels - YOU make the call
THE COMPOSITE LINE - WHAT IT MEANS:
The main line is a weighted composite of inverse-correlated assets:
• DXY (US Dollar Index)
• Real Interest Rates (10Y TIPS)
• US 10-Year Treasury Yield
• US 2-Year Treasury Yield
• Bitcoin (optional)
• Copper (optional)
Line Position:
• Below -30 (Bright Green): Very strong inverse correlation - excellent BUY conditions
• Below 0 (Green): Inverse correlation present - moderate BUY conditions
• Above 0 (Red): Inverse assets rising - neutral to bearish
• Above 30 (Bright Red): Strong inverse rally - bearish for gold
What Causes BUY Signals:
When the composite line is negative (inverse assets falling) AND shows strong correlation (>0.3), this suggests gold is likely to rise. The indicator records your entry and begins tracking profits.
COLOR-CODED PROFIT TARGETS:
EARLY PROFITS (Green Circles):
• 1% - Very Light Green (#c8e6c9) - First confirmation
• 2% - Light Green (#a5d6a7) - Building profit
• 3% - Green (#81c784) - Good profit
• 4% - Medium Green (#66bb6a) - Strong profit
• 5% - Dark Green (#4caf50) - Solid profit!
EXCELLENT PROFIT (Yellow Diamond):
• 10% - Yellow (#ffd54f) - Double digits, excellent trade!
OUTSTANDING PROFIT (Orange Diamonds):
• 15% - Orange (#ffb74d) - Exceptional profit, consider partial exit
EXCEPTIONAL PROFIT (Red Diamonds):
• 20% - Light Red (#ff8a65) - Rare territory, strong exit consideration
• 25% - Red (#f44336) - Extraordinary profit, very rare!
PEAK PROFIT (Purple Star):
• 25%+ - Purple (#9c27b0) - Once in a blue moon! The home run trade!
STOP LOSS (Red X):
• Default -5% - Protection against losses
• Position auto-resets if stop is hit
THE PROFIT BAR (Histogram):
Below the composite line, you'll see a colored histogram when in position:
Bar Color = Your Current Profit Tier
• Light green bar = 1-2% profit
• Green bar = 3-5% profit
• Yellow bar = 10% profit
• Orange bar = 15% profit
• Red bar = 20-25% profit
• Purple bar = 25%+ profit
• Red negative bar = Currently at a loss
Bar Height = Current Profit %
The taller the bar, the larger your profit. Negative bars extend downward when you're at a loss.
THE INFORMATION TABLE:
The table (top-right by default) shows everything at a glance:
Position: ✓ IN (green) or ✗ OUT (gray)
Shows whether you're currently holding a position
Entry Price: Your recorded buy price
Example: 2,100.50
Current Price: Gold's current price
Example: 2,142.75
Current P/L: YOUR PROFIT %
This is the most important metric - shows exactly how much you're up (or down)
Color matches your current profit tier
Example: +2.01% in light green
Profit Tier: Current milestone reached
Shows which profit level you've hit: "1%", "2%", "5%", "10%", etc.
Next Target: The next profit level to watch
Tells you what milestone is coming up next
Bars Held: How long you've been in the trade
Helps track holding time
Composite: Current correlation strength
Shows the underlying composite correlation value
REFERENCE LINES:
Zero Line (Gray):
The center line. Above = bearish for gold, Below = bullish for gold
Strong Bull Line (Green dashed at -30):
When composite crosses below -30, very strong BUY conditions
Strong Bear Line (Red dashed at +30):
When composite crosses above +30, strong bearish conditions
BACKGROUND SHADING:
Very Light Green Background:
You're in profit (position open and above entry price)
Very Light Red Background:
You're at a loss (position open and below entry price)
No Background:
No position currently open
SYMBOLS ON CHART:
▲ Green Triangle Below Line: BUY SIGNAL
Enter long position here. Entry price recorded.
● Small Green Circles Above Line: 1-5% Profits
Early profit targets. Light green to dark green progression.
◆ Diamonds Above Line: 10-25% Profits
Major profit milestones. Yellow → Orange → Red progression.
★ Purple Star Above Line: 25%+ Profit
The holy grail! Peak profit achieved.
✖ Red X Below Line: STOP LOSS HIT
Trade went against you. Position resets (if auto-reset enabled).
PROFIT-TAKING STRATEGIES:
Strategy 1: Fixed Target (Simple)
Pick one target (e.g., 10%) and always exit there.
Best for: Beginners, disciplined traders
Strategy 2: Scaled Exit (Advanced)
Exit in portions:
• 5% profit → Sell 25%
• 10% profit → Sell 25% (50% total out)
• 15% profit → Sell 25% (75% total out)
• 20%+ profit → Let final 25% ride
Best for: Risk management, maximizing upside
Strategy 3: Trailing Stop
• Hit 10%? Set stop at 5%
• Hit 15%? Set stop at 10%
• Lock in profits while letting winners run
Best for: Trend followers, bull markets
Strategy 4: Adaptive
• Strong uptrend → wait for 15-20%
• Choppy market → exit at 5-10%
• Weakening trend → exit at any profit
Best for: Experienced traders
SETTINGS YOU CAN CUSTOMIZE:
Profit Target Levels:
Change any profit % to match your strategy
• Conservative: Lower targets (0.5%, 1%, 2%, 3%, 5%)
• Aggressive: Higher targets (2%, 5%, 10%, 20%, 30%)
Assets to Include:
• Enable/disable Bitcoin
• Enable/disable Copper
• Toggle which inverse assets to track
Display Options:
• Show all targets or just current tier
• Show/hide profit bar
• Show/hide composite line
• Move table position
Stop Loss:
• Set your risk tolerance (default 5%)
• Enable/disable auto-reset on stop loss
Correlation Periods:
• Adjust for your timeframe
• Hourly: 14/30/60
• Daily: 20/50/100
• Weekly: 10/20/50
ALERTS AVAILABLE:
Set alerts for any profit milestone:
Critical Alerts:
• "BUY Signal" - Entry notification
• "5% Profit Target" - First major milestone
• "10% Profit Target" - Decision point
• "Stop Loss Hit" - Risk protection
Optional Alerts:
• 1%, 2%, 3%, 4% - Early confirmations
• 15%, 20%, 25% - Major milestones
• Individual levels for your strategy
BEST TIMEFRAMES:
Daily Chart (Recommended):
Best for swing traders holding 3-10 days
Use default settings (20/50/100 periods)
Target 5-15% profits
4-Hour Chart:
Good for active swing traders
Adjust periods to 14/30/60
Target 3-10% profits
Hourly Chart:
For day traders and scalpers
Use shorter periods (14/30/60)
Target 1-5% profits
Adjust profit levels lower (0.5%, 1%, 2%, 3%)
WHY THIS INDICATOR IS DIFFERENT:
Most indicators tell you WHEN to enter.
This one tells you WHEN TO EXIT with profit.
Most indicators use vague signals.
This one shows EXACT profit percentages.
Most indicators leave exit decisions to you.
This one gives CLEAR, COLOR-CODED milestones.
Most indicators don't track your P/L.
This one shows your profit in text you can't miss.
QUICK START GUIDE:
1. Add indicator to gold chart (XAUUSD, GLD, GC1!)
2. Wait for green triangle (▲) BUY signal
3. Watch your profit grow in the table
4. Exit when you hit YOUR target (5%, 10%, 15%, etc.)
5. Repeat
That's it. Simple. Effective. Profitable.
IMPORTANT NOTES:
• This is for LONG positions only - not for shorting gold
• Position tracking begins only after a BUY signal
• The indicator shows levels - YOU decide when to exit
• Always use stop losses (default 5% is reasonable)
• Past performance doesn't guarantee future results
• Not financial advice - use for educational purposes
PRO TIPS:
Tip 1: Don't get greedy - 10-15% is an excellent profit for most trades
Tip 2: Purple stars (25%+) are RARE - don't wait for them on every trade
Tip 3: The profit bar color change is your visual cue - green→yellow→orange→red
Tip 4: Combine with resistance levels - "10% profit + resistance = exit"
Tip 5: Set alerts for YOUR target level so you never miss it
Tip 6: The giant P/L number in the table removes emotion from decisions
EXAMPLE TRADE:
Day 1: ▲ BUY signal at $2,100
Table shows: Position ✓ IN | Entry: 2,100
Day 2: Current P/L: +1.8%
First green circle appears (1% target hit)
Table tier: "1%"
Day 4: Current P/L: +5.2%
Dark green circle appears (5% target hit)
Profit bar is dark green
Decision point: Exit 50% here?
Day 7: Current P/L: +10.5%
Yellow diamond appears (10% target hit!)
Table shows: +10.5% in yellow text
Decision point: Exit remaining 50%?
Result: Average exit ~7.5% over 7 days. Excellent swing trade!
WORKS ON:
• Gold Spot (XAUUSD)
• Gold Futures (GC1!)
• Gold ETFs (GLD, IAU)
• Any gold instrument
Inverse Assets Tracked:
• DXY (US Dollar Index)
• Real Interest Rates (TIPS)
• US Treasury Yields (2Y, 10Y)
• Bitcoin (optional)
• Copper (optional)
THE BOTTOM LINE:
Stop guessing when to take profits.
Start SEEING your profit levels in real-time.
The indicator shows you the targets.
YOU choose when to cash out.
That's YOUR edge.
Developed for traders who want clear, actionable profit targets instead of vague signals.
Track Real Profits, Exit With Confidence
Best on Daily or Weekly - copy and mod as you see fit. Have fun!
WHAT THIS INDICATOR DOES:
This indicator tracks your gold position from entry and shows color-coded profit targets as the price rises. Instead of guessing when to exit, you see exact profit levels in real-time: 1%, 2%, 3%, 4%, 5%, 10%, 15%, 20%, 25%, and 25%+.
Simple concept: BUY on the signal, SELL at YOUR chosen profit level.
HOW IT WORKS - 3 SIMPLE STEPS:
STEP 1: Wait for BUY Signal
• Green triangle (▲) appears below the composite line
• Triggered when inverse assets (DXY, rates, etc.) show strong correlation and are falling
• Entry price is automatically recorded
• Position tracking begins
STEP 2: Watch Profit Targets Appear
• As gold rises, color-coded symbols appear above the composite line
• Each symbol represents a profit milestone
• The info table shows your current profit
• You decide when to exit based on YOUR target
STEP 3: Exit at Your Chosen Level
• Conservative? Exit at 5-10%
• Moderate? Exit at 10-15%
• Aggressive? Hold for 20%+
• The indicator just shows the levels - YOU make the call
THE COMPOSITE LINE - WHAT IT MEANS:
The main line is a weighted composite of inverse-correlated assets:
• DXY (US Dollar Index)
• Real Interest Rates (10Y TIPS)
• US 10-Year Treasury Yield
• US 2-Year Treasury Yield
• Bitcoin (optional)
• Copper (optional)
Line Position:
• Below -30 (Bright Green): Very strong inverse correlation - excellent BUY conditions
• Below 0 (Green): Inverse correlation present - moderate BUY conditions
• Above 0 (Red): Inverse assets rising - neutral to bearish
• Above 30 (Bright Red): Strong inverse rally - bearish for gold
What Causes BUY Signals:
When the composite line is negative (inverse assets falling) AND shows strong correlation (>0.3), this suggests gold is likely to rise. The indicator records your entry and begins tracking profits.
COLOR-CODED PROFIT TARGETS:
EARLY PROFITS (Green Circles):
• 1% - Very Light Green (#c8e6c9) - First confirmation
• 2% - Light Green (#a5d6a7) - Building profit
• 3% - Green (#81c784) - Good profit
• 4% - Medium Green (#66bb6a) - Strong profit
• 5% - Dark Green (#4caf50) - Solid profit!
EXCELLENT PROFIT (Yellow Diamond):
• 10% - Yellow (#ffd54f) - Double digits, excellent trade!
OUTSTANDING PROFIT (Orange Diamonds):
• 15% - Orange (#ffb74d) - Exceptional profit, consider partial exit
EXCEPTIONAL PROFIT (Red Diamonds):
• 20% - Light Red (#ff8a65) - Rare territory, strong exit consideration
• 25% - Red (#f44336) - Extraordinary profit, very rare!
PEAK PROFIT (Purple Star):
• 25%+ - Purple (#9c27b0) - Once in a blue moon! The home run trade!
STOP LOSS (Red X):
• Default -5% - Protection against losses
• Position auto-resets if stop is hit
THE PROFIT BAR (Histogram):
Below the composite line, you'll see a colored histogram when in position:
Bar Color = Your Current Profit Tier
• Light green bar = 1-2% profit
• Green bar = 3-5% profit
• Yellow bar = 10% profit
• Orange bar = 15% profit
• Red bar = 20-25% profit
• Purple bar = 25%+ profit
• Red negative bar = Currently at a loss
Bar Height = Current Profit %
The taller the bar, the larger your profit. Negative bars extend downward when you're at a loss.
THE INFORMATION TABLE:
The table (top-right by default) shows everything at a glance:
Position: ✓ IN (green) or ✗ OUT (gray)
Shows whether you're currently holding a position
Entry Price: Your recorded buy price
Example: 2,100.50
Current Price: Gold's current price
Example: 2,142.75
Current P/L: YOUR PROFIT %
This is the most important metric - shows exactly how much you're up (or down)
Color matches your current profit tier
Example: +2.01% in light green
Profit Tier: Current milestone reached
Shows which profit level you've hit: "1%", "2%", "5%", "10%", etc.
Next Target: The next profit level to watch
Tells you what milestone is coming up next
Bars Held: How long you've been in the trade
Helps track holding time
Composite: Current correlation strength
Shows the underlying composite correlation value
REFERENCE LINES:
Zero Line (Gray):
The center line. Above = bearish for gold, Below = bullish for gold
Strong Bull Line (Green dashed at -30):
When composite crosses below -30, very strong BUY conditions
Strong Bear Line (Red dashed at +30):
When composite crosses above +30, strong bearish conditions
BACKGROUND SHADING:
Very Light Green Background:
You're in profit (position open and above entry price)
Very Light Red Background:
You're at a loss (position open and below entry price)
No Background:
No position currently open
SYMBOLS ON CHART:
▲ Green Triangle Below Line: BUY SIGNAL
Enter long position here. Entry price recorded.
● Small Green Circles Above Line: 1-5% Profits
Early profit targets. Light green to dark green progression.
◆ Diamonds Above Line: 10-25% Profits
Major profit milestones. Yellow → Orange → Red progression.
★ Purple Star Above Line: 25%+ Profit
The holy grail! Peak profit achieved.
✖ Red X Below Line: STOP LOSS HIT
Trade went against you. Position resets (if auto-reset enabled).
PROFIT-TAKING STRATEGIES:
Strategy 1: Fixed Target (Simple)
Pick one target (e.g., 10%) and always exit there.
Best for: Beginners, disciplined traders
Strategy 2: Scaled Exit (Advanced)
Exit in portions:
• 5% profit → Sell 25%
• 10% profit → Sell 25% (50% total out)
• 15% profit → Sell 25% (75% total out)
• 20%+ profit → Let final 25% ride
Best for: Risk management, maximizing upside
Strategy 3: Trailing Stop
• Hit 10%? Set stop at 5%
• Hit 15%? Set stop at 10%
• Lock in profits while letting winners run
Best for: Trend followers, bull markets
Strategy 4: Adaptive
• Strong uptrend → wait for 15-20%
• Choppy market → exit at 5-10%
• Weakening trend → exit at any profit
Best for: Experienced traders
SETTINGS YOU CAN CUSTOMIZE:
Profit Target Levels:
Change any profit % to match your strategy
• Conservative: Lower targets (0.5%, 1%, 2%, 3%, 5%)
• Aggressive: Higher targets (2%, 5%, 10%, 20%, 30%)
Assets to Include:
• Enable/disable Bitcoin
• Enable/disable Copper
• Toggle which inverse assets to track
Display Options:
• Show all targets or just current tier
• Show/hide profit bar
• Show/hide composite line
• Move table position
Stop Loss:
• Set your risk tolerance (default 5%)
• Enable/disable auto-reset on stop loss
Correlation Periods:
• Adjust for your timeframe
• Hourly: 14/30/60
• Daily: 20/50/100
• Weekly: 10/20/50
ALERTS AVAILABLE:
Set alerts for any profit milestone:
Critical Alerts:
• "BUY Signal" - Entry notification
• "5% Profit Target" - First major milestone
• "10% Profit Target" - Decision point
• "Stop Loss Hit" - Risk protection
Optional Alerts:
• 1%, 2%, 3%, 4% - Early confirmations
• 15%, 20%, 25% - Major milestones
• Individual levels for your strategy
BEST TIMEFRAMES:
Daily Chart (Recommended):
Best for swing traders holding 3-10 days
Use default settings (20/50/100 periods)
Target 5-15% profits
4-Hour Chart:
Good for active swing traders
Adjust periods to 14/30/60
Target 3-10% profits
Hourly Chart:
For day traders and scalpers
Use shorter periods (14/30/60)
Target 1-5% profits
Adjust profit levels lower (0.5%, 1%, 2%, 3%)
WHY THIS INDICATOR IS DIFFERENT:
Most indicators tell you WHEN to enter.
This one tells you WHEN TO EXIT with profit.
Most indicators use vague signals.
This one shows EXACT profit percentages.
Most indicators leave exit decisions to you.
This one gives CLEAR, COLOR-CODED milestones.
Most indicators don't track your P/L.
This one shows your profit in text you can't miss.
QUICK START GUIDE:
1. Add indicator to gold chart (XAUUSD, GLD, GC1!)
2. Wait for green triangle (▲) BUY signal
3. Watch your profit grow in the table
4. Exit when you hit YOUR target (5%, 10%, 15%, etc.)
5. Repeat
That's it. Simple. Effective. Profitable.
IMPORTANT NOTES:
• This is for LONG positions only - not for shorting gold
• Position tracking begins only after a BUY signal
• The indicator shows levels - YOU decide when to exit
• Always use stop losses (default 5% is reasonable)
• Past performance doesn't guarantee future results
• Not financial advice - use for educational purposes
PRO TIPS:
Tip 1: Don't get greedy - 10-15% is an excellent profit for most trades
Tip 2: Purple stars (25%+) are RARE - don't wait for them on every trade
Tip 3: The profit bar color change is your visual cue - green→yellow→orange→red
Tip 4: Combine with resistance levels - "10% profit + resistance = exit"
Tip 5: Set alerts for YOUR target level so you never miss it
Tip 6: The giant P/L number in the table removes emotion from decisions
EXAMPLE TRADE:
Day 1: ▲ BUY signal at $2,100
Table shows: Position ✓ IN | Entry: 2,100
Day 2: Current P/L: +1.8%
First green circle appears (1% target hit)
Table tier: "1%"
Day 4: Current P/L: +5.2%
Dark green circle appears (5% target hit)
Profit bar is dark green
Decision point: Exit 50% here?
Day 7: Current P/L: +10.5%
Yellow diamond appears (10% target hit!)
Table shows: +10.5% in yellow text
Decision point: Exit remaining 50%?
Result: Average exit ~7.5% over 7 days. Excellent swing trade!
WORKS ON:
• Gold Spot (XAUUSD)
• Gold Futures (GC1!)
• Gold ETFs (GLD, IAU)
• Any gold instrument
Inverse Assets Tracked:
• DXY (US Dollar Index)
• Real Interest Rates (TIPS)
• US Treasury Yields (2Y, 10Y)
• Bitcoin (optional)
• Copper (optional)
THE BOTTOM LINE:
Stop guessing when to take profits.
Start SEEING your profit levels in real-time.
The indicator shows you the targets.
YOU choose when to cash out.
That's YOUR edge.
Developed for traders who want clear, actionable profit targets instead of vague signals.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.