PROTECTED SOURCE SCRIPT
Percentage Indicator 10 Days

# 📊 PERCENTAGE INDICATOR 10 DAYS - TRADINGVIEW
**Created by: Alphaomega18**
---
## 🎯 DESCRIPTION
This indicator positions the current price between **0%** and **100%** relative to the last 10 days.
### Calculation Formula:
1. **10-Day High** = The highest closing price of the last 10 days
2. **10-Day Low** = The lowest closing price of the last 10 days
3. **Range** = 10-Day High - 10-Day Low
4. **Variation** = 10-Day High - Current closing price
5. **Percentage** = (Variation ÷ Range) × 100
### Interpretation:
- **100%** (top) → Current price = 10-day High (high position)
- **50%** → Current price is in the middle of the range
- **0%** (bottom) → Current price = 10-day Low (low position)
⚠️ **Important**: The indicator never goes below 0% and never rises above 100%.
---
## 🎨 VISUAL CHARACTERISTICS
### Reference lines:
- **Black line at 100%** (bottom): Position at 10-day high
- **Black line at 0%** (top): Position at 10-day low
- **Gray line at 50%** (median): Center position
- **Dotted lines at 5% and 95%**: Additional graduations
### Colors:
- 🟢 **Green**: Percentage > 50% (close to high)
- 🔴 **Red**: Percentage < 50% (close to low)
### Colored zones:
- **Green zone** (> 70%): Relative strength zone
- **Red zone** (< 30%): Relative weakness zone
### Visual signals:
- 🟢 **Green arrow ▲ "BUY"**: Automatic buy signal when 3 conditions are met
- Appears at the bottom of the chart
- Indicates a potential entry point
- Automatic alert available
### Information table:
A table at the top right displays:
- 10-Day High
- 10-Day Low
- Range
- Variation
- Current Percentage
---
## 💡 HOW TO USE IT
### Trading signals:
#### 📈 Potential buy signals:
- **Percentage < 20%**: Price is close to the 10-day low
→ Potential technical bounce
- **Percentage reaches 0%**: Price touches the low
→ Extreme oversold zone
- **Percentage near 5%**: Oversold alert zone
#### 📉 Potential sell signals:
- **Percentage > 80%**: Price is close to the 10-day high
→ Potential technical correction
- **Percentage reaches 100%**: Price touches the high
→ Extreme overbought zone
- **Percentage near 95%**: Overbought alert zone
### Practical examples:
**Example 1: GOLD**
- Percentage at 15% → Gold is close to its 10-day low
- Signal: Potential support, watch for a buy
**Example 2: CRUDE OIL**
- Percentage at 85% → Oil is close to its 10-day high
- Signal: Potential resistance, watch for profit-taking
---
## 🎯 AUTOMATIC BUY SIGNAL (GREEN ARROW)
The indicator displays a **green arrow ▲** with the text "BUY" when **all 3 conditions** are met:
### The 3 mandatory conditions:
1️⃣ **%R reaches 100%**
- Price touches or exceeds the 10-day high
2️⃣ **5 days have elapsed** since the 100% level was reached
- The indicator counts 5 bars (days) since 100% was touched
- This period confirms consolidation at the high
3️⃣ **%R falls back below 95%**
- After waiting 5 days at 100%, %R drops below 95%
- This indicates the beginning of a price decline
### Signal interpretation:
✅ **Valid buy signal**: Green arrow ▲ appears
- Price touched a high (100%)
- The high held for at least 5 days (consolidation)
- Price begins to decline (crossing below 95%)
- → **Confirmed reversal potential for buying on the dip**
### Chronological example:
```
Day 1 : %R = 100% (price touches 10-day high)
Day 2 : %R = 100% (stays at high)
Day 3 : %R = 100% (consolidation)
Day 4 : %R = 100% (consolidation)
Day 5 : %R = 100% (consolidation - 5 days elapsed)
Day 6 : %R = 94% → 🟢 GREEN ARROW APPEARS = BUY SIGNAL
```
### Signal advantages:
✅ **Avoids false signals**: Waits for 5-day consolidation
✅ **Confirms reversal**: Price must actually decline (below 95%)
✅ **Precise entry point**: Clear and unambiguous signal
✅ **Automatic alert**: Immediate notification when conditions are met
---
## 🔔 AVAILABLE ALERTS
The indicator includes automatic alerts:
### Create an alert:
1. Click on **"Alert"** (⏰)
2. Condition: **"Percentage Indicator 10 Days"**
3. Choose:
- **"Oversold Zone"**: Alert when percentage < 20%
- **"Overbought Zone"**: Alert when percentage > 80%
- **"Buy Signal"**: ⭐ Alert when all 3 conditions are met for a buy signal
---
## ⚙️ PARAMETERS
- **Calculation Period**: Default 10 days (adjustable)
- Increase for more smoothing (15, 20 days)
- Decrease for more reactivity (5, 7 days)
---
## 📊 RECOMMENDED STRATEGY
### Mean reversion strategy:
1. **Wait** for percentage to reach extreme zones:
- Low zone (< 20%) to buy
- High zone (> 80%) to sell
2. **Confirm** with other indicators:
- RSI
- Volume
- Support/Resistance
3. **Place** a stop-loss outside the 10-day range
### Trade example:
```
Entry: Percentage at 10% (close to low)
Stop Loss: Below 10-day low
Take Profit: Percentage returns to 50% or higher
```
---
## 🔍 RECOMMENDED COMMODITIES
Particularly effective on:
- **Gold** (GOLD)
- **Silver** (SILVER)
- **Crude Oil WTI** (CRUDE OIL)
- **Brent Oil** (BRENT)
- **Natural Gas** (NATURAL GAS)
- **Copper** (COPPER)
- **Precious metals**
---
## ⚠️ WARNINGS
- ⚠️ This indicator shows the **relative position** of price, not future direction
- ⚠️ A price at 0% can continue to fall (new low)
- ⚠️ A price at 100% can continue to rise (new high)
- ⚠️ The indicator always stays **between 0% and 100%** (no negative values or >100%)
- ⚠️ **Always** combine with other analyses
- ⚠️ **Never** trade on a single indicator alone
---
## 🛠️ RECOMMENDED COMBINATIONS
Use this indicator with:
1. **RSI**: Confirm oversold/overbought conditions
2. **MACD**: Confirm the trend
3. **Volume**: Validate movement strength
4. **Support/Resistance**: Identify key zones
5. **Bollinger Bands**: Measure volatility
---
## 📝 TECHNICAL NOTES
- **Version**: Pine Script v5
- **Type**: Indicator (separate panel)
- **Scale**: Always between 0% and 100%
- **Update**: Real-time
---
## 📖 READING EXAMPLE
```
10-Day High: 2700
10-Day Low: 2600
Current Price: 2650
Range = 2700 - 2600 = 100
Variation = 2700 - 2650 = 50
Percentage = (50 ÷ 100) × 100 = 50%
→ Price is exactly in the middle of the 10-day range
```
---
**Happy Trading! 🚀**
---
**© Alphaomega18** - Percentage Indicator 10 Days
**Created by: Alphaomega18**
---
## 🎯 DESCRIPTION
This indicator positions the current price between **0%** and **100%** relative to the last 10 days.
### Calculation Formula:
1. **10-Day High** = The highest closing price of the last 10 days
2. **10-Day Low** = The lowest closing price of the last 10 days
3. **Range** = 10-Day High - 10-Day Low
4. **Variation** = 10-Day High - Current closing price
5. **Percentage** = (Variation ÷ Range) × 100
### Interpretation:
- **100%** (top) → Current price = 10-day High (high position)
- **50%** → Current price is in the middle of the range
- **0%** (bottom) → Current price = 10-day Low (low position)
⚠️ **Important**: The indicator never goes below 0% and never rises above 100%.
---
## 🎨 VISUAL CHARACTERISTICS
### Reference lines:
- **Black line at 100%** (bottom): Position at 10-day high
- **Black line at 0%** (top): Position at 10-day low
- **Gray line at 50%** (median): Center position
- **Dotted lines at 5% and 95%**: Additional graduations
### Colors:
- 🟢 **Green**: Percentage > 50% (close to high)
- 🔴 **Red**: Percentage < 50% (close to low)
### Colored zones:
- **Green zone** (> 70%): Relative strength zone
- **Red zone** (< 30%): Relative weakness zone
### Visual signals:
- 🟢 **Green arrow ▲ "BUY"**: Automatic buy signal when 3 conditions are met
- Appears at the bottom of the chart
- Indicates a potential entry point
- Automatic alert available
### Information table:
A table at the top right displays:
- 10-Day High
- 10-Day Low
- Range
- Variation
- Current Percentage
---
## 💡 HOW TO USE IT
### Trading signals:
#### 📈 Potential buy signals:
- **Percentage < 20%**: Price is close to the 10-day low
→ Potential technical bounce
- **Percentage reaches 0%**: Price touches the low
→ Extreme oversold zone
- **Percentage near 5%**: Oversold alert zone
#### 📉 Potential sell signals:
- **Percentage > 80%**: Price is close to the 10-day high
→ Potential technical correction
- **Percentage reaches 100%**: Price touches the high
→ Extreme overbought zone
- **Percentage near 95%**: Overbought alert zone
### Practical examples:
**Example 1: GOLD**
- Percentage at 15% → Gold is close to its 10-day low
- Signal: Potential support, watch for a buy
**Example 2: CRUDE OIL**
- Percentage at 85% → Oil is close to its 10-day high
- Signal: Potential resistance, watch for profit-taking
---
## 🎯 AUTOMATIC BUY SIGNAL (GREEN ARROW)
The indicator displays a **green arrow ▲** with the text "BUY" when **all 3 conditions** are met:
### The 3 mandatory conditions:
1️⃣ **%R reaches 100%**
- Price touches or exceeds the 10-day high
2️⃣ **5 days have elapsed** since the 100% level was reached
- The indicator counts 5 bars (days) since 100% was touched
- This period confirms consolidation at the high
3️⃣ **%R falls back below 95%**
- After waiting 5 days at 100%, %R drops below 95%
- This indicates the beginning of a price decline
### Signal interpretation:
✅ **Valid buy signal**: Green arrow ▲ appears
- Price touched a high (100%)
- The high held for at least 5 days (consolidation)
- Price begins to decline (crossing below 95%)
- → **Confirmed reversal potential for buying on the dip**
### Chronological example:
```
Day 1 : %R = 100% (price touches 10-day high)
Day 2 : %R = 100% (stays at high)
Day 3 : %R = 100% (consolidation)
Day 4 : %R = 100% (consolidation)
Day 5 : %R = 100% (consolidation - 5 days elapsed)
Day 6 : %R = 94% → 🟢 GREEN ARROW APPEARS = BUY SIGNAL
```
### Signal advantages:
✅ **Avoids false signals**: Waits for 5-day consolidation
✅ **Confirms reversal**: Price must actually decline (below 95%)
✅ **Precise entry point**: Clear and unambiguous signal
✅ **Automatic alert**: Immediate notification when conditions are met
---
## 🔔 AVAILABLE ALERTS
The indicator includes automatic alerts:
### Create an alert:
1. Click on **"Alert"** (⏰)
2. Condition: **"Percentage Indicator 10 Days"**
3. Choose:
- **"Oversold Zone"**: Alert when percentage < 20%
- **"Overbought Zone"**: Alert when percentage > 80%
- **"Buy Signal"**: ⭐ Alert when all 3 conditions are met for a buy signal
---
## ⚙️ PARAMETERS
- **Calculation Period**: Default 10 days (adjustable)
- Increase for more smoothing (15, 20 days)
- Decrease for more reactivity (5, 7 days)
---
## 📊 RECOMMENDED STRATEGY
### Mean reversion strategy:
1. **Wait** for percentage to reach extreme zones:
- Low zone (< 20%) to buy
- High zone (> 80%) to sell
2. **Confirm** with other indicators:
- RSI
- Volume
- Support/Resistance
3. **Place** a stop-loss outside the 10-day range
### Trade example:
```
Entry: Percentage at 10% (close to low)
Stop Loss: Below 10-day low
Take Profit: Percentage returns to 50% or higher
```
---
## 🔍 RECOMMENDED COMMODITIES
Particularly effective on:
- **Gold** (GOLD)
- **Silver** (SILVER)
- **Crude Oil WTI** (CRUDE OIL)
- **Brent Oil** (BRENT)
- **Natural Gas** (NATURAL GAS)
- **Copper** (COPPER)
- **Precious metals**
---
## ⚠️ WARNINGS
- ⚠️ This indicator shows the **relative position** of price, not future direction
- ⚠️ A price at 0% can continue to fall (new low)
- ⚠️ A price at 100% can continue to rise (new high)
- ⚠️ The indicator always stays **between 0% and 100%** (no negative values or >100%)
- ⚠️ **Always** combine with other analyses
- ⚠️ **Never** trade on a single indicator alone
---
## 🛠️ RECOMMENDED COMBINATIONS
Use this indicator with:
1. **RSI**: Confirm oversold/overbought conditions
2. **MACD**: Confirm the trend
3. **Volume**: Validate movement strength
4. **Support/Resistance**: Identify key zones
5. **Bollinger Bands**: Measure volatility
---
## 📝 TECHNICAL NOTES
- **Version**: Pine Script v5
- **Type**: Indicator (separate panel)
- **Scale**: Always between 0% and 100%
- **Update**: Real-time
---
## 📖 READING EXAMPLE
```
10-Day High: 2700
10-Day Low: 2600
Current Price: 2650
Range = 2700 - 2600 = 100
Variation = 2700 - 2650 = 50
Percentage = (50 ÷ 100) × 100 = 50%
→ Price is exactly in the middle of the 10-day range
```
---
**Happy Trading! 🚀**
---
**© Alphaomega18** - Percentage Indicator 10 Days
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.