PROTECTED SOURCE SCRIPT
momentum index 25 days commodity

📊 MOMENTUM INDEX 25 DAYS - TRADINGVIEW
**Created by: Alphaomega18**
---
## 🎯 DESCRIPTION
This indicator calculates the **Momentum Index** for commodities using the formula:
**Momentum Index = Today's closing price - Closing price 25 days ago**
### Interpretation:
- ✅ **Positive value** (above 0) → **BULLISH** trend
- ❌ **Negative value** (below 0) → **BEARISH** trend
- 📍 **Value = 0** → No change over 25 days
---
## ⚙️ CUSTOMIZABLE PARAMETERS
In the indicator settings (gear icon ⚙️), you can modify:
- **Momentum Period**: Default 25 days, you can change to 10, 20, 30, etc.
- **Moving Average Period**: Default 10 days, you can adjust as needed
---
## 🎨 VISUAL CHARACTERISTICS
- **Black horizontal line at 0**: Reference line
- **Histogram**:
- 🟢 **Green**: Positive momentum (uptrend)
- 🔴 **Red**: Negative momentum (downtrend)
- **Blue line**: Continuous momentum curve
- **Orange line**: 10-period moving average of momentum (smooths fluctuations)
- **Colored background**: Slightly colored zone for easier reading
- **Label**: Displays current momentum value
---
## 🔔 AVAILABLE ALERTS
The indicator includes automatic alerts:
### Create an alert:
1. Click on the **"Alert"** icon (⏰) in TradingView
2. Condition: **"Momentum Index 25 Days"**
3. Choose:
- **"Momentum turns positive"**: Alert when momentum crosses above 0
- **"Momentum turns negative"**: Alert when momentum crosses below 0
4. Configure your notifications (email, popup, etc.)
---
## 💡 HOW TO USE
### On any commodity:
- **Gold** (GOLD, GC1!)
- **Silver** (SILVER, SI1!)
- **Crude Oil WTI** (CRUDE OIL, CL1!)
- **Brent Oil** (BRENT, BZ1!)
- **Natural Gas** (NATURAL GAS, NG1!)
- **Copper** (COPPER, HG1!)
- **Wheat** (WHEAT, ZW1!)
- **Corn** (CORN, ZC1!)
- **Soybeans** (SOYBEANS, ZS1!)
### Analysis example:
1. Open the **Gold** (GOLD) chart
2. Add the **"Momentum Index 25 Days"** indicator
3. Observe:
- If the histogram is **green** → Gold is rising compared to 25 days ago
- If the histogram is **red** → Gold is falling compared to 25 days ago
- When it **crosses the 0 line** → Trend change
---
## 🔍 TRADING STRATEGY (EXAMPLE)
### Potential buy signal:
- Momentum **goes from negative to positive** (crosses 0 upward)
- Confirmation: momentum continues to increase
### Potential sell signal:
- Momentum **goes from positive to negative** (crosses 0 downward)
- Confirmation: momentum continues to decrease
⚠️ **CAUTION**: This indicator should be used with other analyses. Never trade on a single indicator.
---
## 📊 RECOMMENDED COMBINATIONS
Combine this indicator with:
- **RSI** (Relative Strength Index) for overbought/oversold zones
- **MACD** to confirm trends
- **Moving Averages** (50 and 200 days) for long-term trend
- **Volume** to confirm movement strength
---
## 🆕 MOVING AVERAGE FEATURE
The **orange line** represents a 10-period moving average of the momentum:
### Benefits:
- **Smooths daily fluctuations** in momentum
- **Identifies the trend** more clearly
- **Filters short-term noise**
- Clearly visible **orange line** on the chart
### How to use it:
- When momentum crosses **above** the moving average → Strengthening uptrend
- When momentum crosses **below** the moving average → Strengthening downtrend
- The moving average acts as a **dynamic support/resistance** for momentum
---
## 🛠️ SUPPORT
If you encounter any issues:
1. Make sure you copied **all** the code
2. Ensure you're using TradingView (not another platform)
3. The code is compatible with **Pine Script v5**
---
## 📝 TECHNICAL NOTES
- **Pine Script Version**: v5
- **Type**: Indicator (overlay=false, displays in separate panel)
- **Calculation**: `close - close[25]`
- **Update**: Real-time with each new candle
---
**Happy Trading! 🚀**
---
**© Alphaomega18** - Momentum Index 25 Days with Moving Average
**Created by: Alphaomega18**
---
## 🎯 DESCRIPTION
This indicator calculates the **Momentum Index** for commodities using the formula:
**Momentum Index = Today's closing price - Closing price 25 days ago**
### Interpretation:
- ✅ **Positive value** (above 0) → **BULLISH** trend
- ❌ **Negative value** (below 0) → **BEARISH** trend
- 📍 **Value = 0** → No change over 25 days
---
## ⚙️ CUSTOMIZABLE PARAMETERS
In the indicator settings (gear icon ⚙️), you can modify:
- **Momentum Period**: Default 25 days, you can change to 10, 20, 30, etc.
- **Moving Average Period**: Default 10 days, you can adjust as needed
---
## 🎨 VISUAL CHARACTERISTICS
- **Black horizontal line at 0**: Reference line
- **Histogram**:
- 🟢 **Green**: Positive momentum (uptrend)
- 🔴 **Red**: Negative momentum (downtrend)
- **Blue line**: Continuous momentum curve
- **Orange line**: 10-period moving average of momentum (smooths fluctuations)
- **Colored background**: Slightly colored zone for easier reading
- **Label**: Displays current momentum value
---
## 🔔 AVAILABLE ALERTS
The indicator includes automatic alerts:
### Create an alert:
1. Click on the **"Alert"** icon (⏰) in TradingView
2. Condition: **"Momentum Index 25 Days"**
3. Choose:
- **"Momentum turns positive"**: Alert when momentum crosses above 0
- **"Momentum turns negative"**: Alert when momentum crosses below 0
4. Configure your notifications (email, popup, etc.)
---
## 💡 HOW TO USE
### On any commodity:
- **Gold** (GOLD, GC1!)
- **Silver** (SILVER, SI1!)
- **Crude Oil WTI** (CRUDE OIL, CL1!)
- **Brent Oil** (BRENT, BZ1!)
- **Natural Gas** (NATURAL GAS, NG1!)
- **Copper** (COPPER, HG1!)
- **Wheat** (WHEAT, ZW1!)
- **Corn** (CORN, ZC1!)
- **Soybeans** (SOYBEANS, ZS1!)
### Analysis example:
1. Open the **Gold** (GOLD) chart
2. Add the **"Momentum Index 25 Days"** indicator
3. Observe:
- If the histogram is **green** → Gold is rising compared to 25 days ago
- If the histogram is **red** → Gold is falling compared to 25 days ago
- When it **crosses the 0 line** → Trend change
---
## 🔍 TRADING STRATEGY (EXAMPLE)
### Potential buy signal:
- Momentum **goes from negative to positive** (crosses 0 upward)
- Confirmation: momentum continues to increase
### Potential sell signal:
- Momentum **goes from positive to negative** (crosses 0 downward)
- Confirmation: momentum continues to decrease
⚠️ **CAUTION**: This indicator should be used with other analyses. Never trade on a single indicator.
---
## 📊 RECOMMENDED COMBINATIONS
Combine this indicator with:
- **RSI** (Relative Strength Index) for overbought/oversold zones
- **MACD** to confirm trends
- **Moving Averages** (50 and 200 days) for long-term trend
- **Volume** to confirm movement strength
---
## 🆕 MOVING AVERAGE FEATURE
The **orange line** represents a 10-period moving average of the momentum:
### Benefits:
- **Smooths daily fluctuations** in momentum
- **Identifies the trend** more clearly
- **Filters short-term noise**
- Clearly visible **orange line** on the chart
### How to use it:
- When momentum crosses **above** the moving average → Strengthening uptrend
- When momentum crosses **below** the moving average → Strengthening downtrend
- The moving average acts as a **dynamic support/resistance** for momentum
---
## 🛠️ SUPPORT
If you encounter any issues:
1. Make sure you copied **all** the code
2. Ensure you're using TradingView (not another platform)
3. The code is compatible with **Pine Script v5**
---
## 📝 TECHNICAL NOTES
- **Pine Script Version**: v5
- **Type**: Indicator (overlay=false, displays in separate panel)
- **Calculation**: `close - close[25]`
- **Update**: Real-time with each new candle
---
**Happy Trading! 🚀**
---
**© Alphaomega18** - Momentum Index 25 Days with Moving Average
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน