PROTECTED SOURCE SCRIPT
Aggiornato

GANN Angles Levels

251
GANN Angles Levels - Mathematical Support & Resistance (45°, 90°, 180°, 360°)

GANN-based mathematical support/resistance levels using square root calculations and geometric angles. Provides 4 key GANN levels with customizable multipliers.


🎯 GANN ANGLES LEVELS (GAL)

This indicator calculates support and resistance levels using W.D. GANN's mathematical principles based on square roots and geometric angles.

✨ KEY FEATURES:
- 📐 4 GANN Geometric Angles: 45°, 90°, 180°, 360°
- 🔢 Manual Price Input for Base Level
- 📈 Bullish/Bearish Direction Selection
- ⚙️ Customizable Multipliers (0.5, 1, 1.5, 2, None)
- 📊 Optional Information Table
- 🎨 Color-coded Levels (Blue for input, Green/Red for calculated levels)

💡 HOW TO USE:
1. 🎯 **CRITICAL: Select a REAL high or low point** (significant peak or trough)
2. Set this high/low price manually as your base price
3. Choose direction:
• **Bullish** for support levels (from a major LOW)
• **Bearish** for resistance levels (from a major HIGH)
4. **Select multiplier based on timeframe:**
• 📈 **Higher timeframes (Daily, Weekly, Monthly):** Use larger multipliers (1.5, 2)
• ⚡ **Lower timeframes (1H, 4H, 15M, 5M):** Use smaller multipliers (0.5, 1) or None
• 🎯 **Scalping/Intraday:** Often use "None" for tighter levels
5. GANN levels will be calculated progressively using the time-tested formula

⚠️ **IMPORTANT NOTE:**
The accuracy of GANN levels depends heavily on selecting genuine market highs and lows. Use significant pivot points, not random price levels.

🎯 PERFECT FOR:
- GANN Analysis & Trading
- Mathematical Support/Resistance
- Price Target Setting
- Geometric Price Analysis
- Classical Technical Analysis

Based on W.D. GANN's time-tested mathematical principles for market analysis.

🔒 PROTECTED SCRIPT
This indicator is protected and the source code is not visible.
All rights reserved.
Note di rilascio
✨ MAJOR UPDATE - Complete Overhaul ✨

🔄 FUNDAMENTAL CHANGES:
- Complete mathematical formula redesign using pure GANN methodology
- Removed complex multiplier systems - now uses fixed angle coefficients
- Streamlined from variable calculations to 10 precise GANN angles

📐 NEW ANGLE SYSTEM:
- 22.5° (0.125) | 45° (0.25) | 67.5° (0.375) | 90° (0.5) | 135° (0.75)
- 180° (1.0) | 225° (1.25) | 270° (1.5) | 315° (1.75) | 360° (2.0)
- Removed 12.5° angle for cleaner analysis

🎨 ENHANCED VISUAL SYSTEM:
- 🔴 RED: Bullish direction (resistance levels above price)
- 🟢 GREEN: Bearish direction (support levels below price)
- 🟠 ORANGE: Special golden angles (67.5°, 135°, 270°) - direction independent
- Thick lines for major angles (45°, 90°, 180°, 360°)
- Extended lines across entire chart history and future

⚙️ IMPROVED CONTROLS:
- "All" - Display all 10 angles
- "Major Only" - Show 4 primary angles only
- "Custom" - Individual toggle for each angle
- Repositioned labels 50 bars to the right for clarity

🧮 SIMPLIFIED FORMULA:
New: Level = (√Input_Price ± Fixed_Coefficient)²
Old: Complex progressive calculations with variable multipliers

🎯 PERFECT FOR:
- Classical GANN analysis
- Support/Resistance identification
- Price target setting from significant highs/lows
- Multi-timeframe analysis

⚠️ IMPORTANT: Always select genuine market highs/lows as input price for optimal accuracy.

Based on W.D. GANN's original square root mathematical principles.
Note di rilascio
💡 Usage Tips:
1. Select major swing highs for resistance analysis (Bullish)
2. Select major swing lows for support analysis (Bearish)
3. Use "Major Only" for clean primary levels
4. Golden angles (Orange) often act as pivot points
5. Works best on higher timeframes (4H+)
Note di rilascio
🎯 GANN ANGLES LEVELS v2.0 - MAJOR UPDATE

✨ COMPLETE MATHEMATICAL OVERHAUL ✨

🧮 NEW PURE GANN FORMULA:
Based on W.D. GANN's original square root methodology:
- Formula: Level = (√Input_Price ± Fixed_Coefficient)²
- 10 precise GANN angles with fixed mathematical coefficients
- No complex multipliers - pure geometric calculations

📐 THE 10 GANN ANGLES:
🔴🟢 Main Angles (Thick Lines):
- 45° (0.25) - Primary GANN angle
- 90° (0.5) - Quarter circle
- 180° (1.0) - Half circle
- 360° (2.0) - Full circle

🟠 Golden Angles (Special Orange):
- 67.5° (0.375) - Sacred geometry angle
- 135° (0.75) - Fibonacci-related angle
- 270° (1.5) - Three-quarter circle

🔴🟢 Secondary Angles (Thin Lines):
- 22.5° (0.125) - Eighth circle
- 225° (1.25) - Extended angle
- 315° (1.75) - Near-complete circle

🎨 INTELLIGENT COLOR SYSTEM:
- 🔴 RED: Bullish direction (resistance levels above current price)
- 🟢 GREEN: Bearish direction (support levels below current price)
- 🟠 ORANGE: Golden angles (direction-independent special levels)
- 🔵 BLUE: Input reference price

📈 NEW EMA 200 FILTER:
- Built-in EMA 200 for trend confirmation
- Customizable: Color, line style (solid/dashed/dotted), thickness
- Show/hide toggle - appears in information table
- Fixed at 200 periods for institutional-grade analysis

⚙️ FLEXIBLE DISPLAY OPTIONS:
- "All" - Show all 10 GANN angles
- "Major Only" - Display 4 primary angles (45°, 90°, 180°, 360°)
- "Custom" - Individual toggle for each angle
- Extended lines across entire chart history and future
- Repositioned labels for optimal visibility

📊 ENHANCED INFORMATION TABLE:
- Shows all active levels with precise values
- EMA 200 current value (when enabled)
- Color-coded entries matching chart lines
- Golden angles highlighted in orange

🎯 PERFECT FOR:
- Classical GANN analysis and time/price relationships
- Support/Resistance identification with mathematical precision
- Price target setting from significant market turning points
- Multi-timeframe analysis using sacred geometry
- Trend confirmation with EMA filter integration

⚠️ USAGE GUIDELINES:
1. 📍 CRITICAL: Always select genuine market highs/lows as input price
2. 🔺 Bullish: Use for resistance analysis from major LOW points
3. 🔻 Bearish: Use for support analysis from major HIGH points
4. ⏰ Best results on higher timeframes (4H, Daily, Weekly)
5. 🎯 Combine with EMA 200 for trend confirmation

🔧 TECHNICAL IMPROVEMENTS:
- Simplified codebase - removed complex multiplier systems
- Enhanced performance with fixed calculations
- Better visual hierarchy with line thickness differentiation
- Improved label positioning and sizing
- Extended lines for historical and future analysis

📚 BASED ON:
W.D. GANN's original mathematical principles and square root calculations,
refined for modern trading platforms with enhanced visual presentation.

🌟 This update transforms the indicator from a complex calculation tool
into a pure, powerful GANN analysis instrument that honors the original
methodology while providing modern usability features.
Note di rilascio
✨ New Features Added:
1. New Line Width Controls
pinescript// === Line Style Settings ===
line_width = input.int(2, title = 'Line Width', minval = 1, maxval = 5, group = 'Line Style')
major_line_width = input.int(3, title = 'Major Levels Line Width', minval = 1, maxval = 5, group = 'Line Style')

Line Width: Controls thickness of regular angle lines (Default: 2)
Major Levels Line Width: Controls thickness of major angle lines (Default: 3)

2. Unified Color System
Before Update:

Angles 67.5°, 135°, 270° were displayed in gold/orange color
Other angles in red/green

After Update:

All angles use the same color based on direction
Red for Bullish direction
Green for Bearish direction

3. Variable Line Thickness Implementation
Note di rilascio
Add new Levels
Note di rilascio
# 📊 GANN Angles Levels Indicator

## Overview
This advanced Pine Script indicator calculates precise support and resistance levels using W.D. Gann's mathematical formulas based on square roots and geometric angles. The indicator provides traders with 16 different angle levels to identify potential price reversal points and market structure.

## Key Features

### 🎯 **16 Precision Levels**
- **8 Major Levels**: 45°, 90°, 135°, 180°, 225°, 270°, 315°, 360°
- **8 Minor Levels**: 22.5°, 67.5°, 112.5°, 157.5°, 202.5°, 247.5°, 292.5°, 337.5°

### ⚙️ **Customizable Display Options**
- **All Levels**: Show all 16 angles
- **Major Only**: Display only the 8 primary Gann angles
- **Custom Selection**: Choose specific angles to display

### 🎨 **Visual Customization**
- **Separate Line Styles**: Different styling for major and minor levels
- **Direction Support**: Bullish (resistance) or Bearish (support) calculations
- **Color Coding**: Automatic color assignment based on direction
- **Price Scaling**: Multiple scaling factors (0.01, 0.1, 1, 10, 100) for different assets

### 📈 **Additional Features**
- **EMA 200**: Optional moving average overlay with customizable styling
- **Information Table**: Real-time display of all calculated levels
- **Extended Lines**: Levels extend across the entire chart
- **Smart Labels**: Clear angle identification on each level

## How It Works

The indicator uses Gann's square root methodology:
1. Takes the square root of the input price
2. Applies specific angle multipliers for each level
3. Squares the result to get the final price level
4. Adjusts calculations based on bullish/bearish direction

**Formula**: `Level = (√Price ± (Multiplier × Scale Factor))²`

## Usage Instructions

1. **Set Input Price**: Enter the base price for calculations
2. **Choose Direction**: Select Bullish for resistance or Bearish for support
3. **Select Display Mode**: Choose which levels to show
4. **Adjust Scaling**: Use price scale factor for different asset types
5. **Customize Appearance**: Set line styles for major/minor levels

## Best Practices

- Use on higher timeframes (Daily, Weekly) for better reliability
- Combine with other technical analysis tools
- Pay special attention to major angle levels (45°, 90°, 180°, 270°)
- Adjust scaling factor based on asset price range
- Monitor price reactions at calculated levels

## Asset Compatibility

✅ **Stocks** | ✅ **Forex** | ✅ **Crypto** | ✅ **Commodities** | ✅ **Indices**

## Technical Specifications

- **Pine Script Version**: v6
- **Overlay**: Yes
- **Max Labels**: 500
- **Calculations**: Real-time updates
- **Performance**: Optimized for all timeframes

---

*This indicator is based on W.D. Gann's time-tested mathematical principles and is designed to help traders identify key price levels where market reversals may occur.*

## Disclaimer
This indicator is for educational and informational purposes only. Always conduct your own research and risk management before making trading decisions.
Note di rilascio
# GANN Angles Levels Indicator - Major Update v4.0

## 🚀 **New Features Overview**

This major update introduces **dual input support** with complete customization for each input, allowing traders to analyze multiple GANN levels simultaneously with independent settings.

---

## 📊 **Dual Input System**

### **Input 1 & Input 2 - Completely Independent**
- **Separate Price Inputs**: Set different price levels for each input
- **Independent Directions**: Each input can be Bullish or Bearish independently
- **Individual Control**: Show/hide each input separately
- **Custom Level Display**: Choose "All", "Major Only", or "Custom" for each input

---

## 🎨 **Advanced Color Customization**

### **Input 1 Colors**
- Major Levels - Bullish Color (Default: Red)
- Major Levels - Bearish Color (Default: Green)
- Minor Levels - Bullish Color (Default: Orange)
- Minor Levels - Bearish Color (Default: Blue)

### **Input 2 Colors**
- Major Levels - Bullish Color (Default: Purple)
- Major Levels - Bearish Color (Default: Yellow)
- Minor Levels - Bullish Color (Default: Gray)
- Minor Levels - Bearish Color (Default: Navy)

---

## ✏️ **Line Style Customization**

### **Input 1 Line Styles**
- **Major Levels Line Style**: Solid/Dashed/Dotted
- **Minor Levels Line Style**: Solid/Dashed/Dotted
- **Major Levels Line Width**: 1-5 pixels
- **Minor Levels Line Width**: 1-5 pixels

### **Input 2 Line Styles**
- **Major Levels Line Style**: Solid/Dashed/Dotted
- **Minor Levels Line Style**: Solid/Dashed/Dotted
- **Major Levels Line Width**: 1-5 pixels
- **Minor Levels Line Width**: 1-5 pixels

---

## 🔧 **Custom Angle Selection**

### **Input 1 Custom Angles**
Individual control over all 16 GANN angles:
- **Major Angles**: 45°, 90°, 135°, 180°, 225°, 270°, 315°, 360°
- **Minor Angles**: 22.5°, 67.5°, 112.5°, 157.5°, 202.5°, 247.5°, 292.5°, 337.5°

### **Input 2 Custom Angles**
Separate control for the second input with the same 16 angles available.

---

## 📋 **Enhanced Information Display**

### **Updated Labels**
- **Input 1 Labels**: Prefixed with "1-" (e.g., "1-45°: 123.45")
- **Input 2 Labels**: Prefixed with "2-" (e.g., "2-90°: 234.56")
- **Input Price Labels**: "Input 1: 100.00" and "Input 2: 200.00"

### **Comprehensive Table**
- Displays all active levels for both inputs
- Color-coded entries for easy identification
- Dynamic sizing based on active inputs

---

## 🎯 **Organized Settings Groups**

### **Main Settings Groups**
1. **Input 1 Settings** - Basic configuration for first input
2. **Input 2 Settings** - Basic configuration for second input
3. **Input 1 Colors** - Color customization for first input
4. **Input 2 Colors** - Color customization for second input
5. **Input 1 Line Styles** - Line appearance for first input
6. **Input 2 Line Styles** - Line appearance for second input
7. **Input 1 Custom Angles** - Angle selection for first input
8. **Input 2 Custom Angles** - Angle selection for second input
9. **General** - Global settings (table display)
10. **Price Scaling** - Scaling factor settings
11. **Moving Average** - EMA 200 settings

---

## 🔍 **Technical Improvements**

### **Enhanced Functions**
- `get_line_color(angle, direction, input_num)` - Returns appropriate color based on input
- `get_line_style(angle, input_num)` - Returns line style based on input and angle type
- `get_line_width(angle, input_num)` - Returns line width based on input and angle type
- `should_show_level(angle, input_num, show_levels_val)` - Controls level visibility per input

### **Optimized Performance**
- Conditional rendering based on input visibility
- Efficient label management with proper cleanup
- Dynamic table sizing

---

## 💡 **Usage Examples**

### **Scenario 1: Support & Resistance Analysis**
- **Input 1**: Current price level (Bullish direction)
- **Input 2**: Previous significant high/low (Bearish direction)
- **Result**: Comprehensive S/R levels from multiple perspectives

### **Scenario 2: Multi-Timeframe Analysis**
- **Input 1**: Daily timeframe key level
- **Input 2**: Weekly timeframe key level
- **Result**: Confluence zones identification

### **Scenario 3: Breakout Planning**
- **Input 1**: Resistance level (Bullish for targets above)
- **Input 2**: Support level (Bearish for targets below)
- **Result**: Multiple price targets in both directions

---

## 🎨 **Visual Enhancements**

### **Default Color Scheme**
- **Input 1**: Red/Green majors, Orange/Blue minors
- **Input 2**: Purple/Yellow majors, Gray/Navy minors
- **Clear visual distinction** between the two inputs

### **Professional Appearance**
- Clean, organized interface
- Consistent styling across all elements
- Easy-to-read labels and table

---

## 🔄 **Backward Compatibility**

- All original features preserved
- Default settings maintain familiar behavior
- Input 2 disabled by default (optional activation)

---

## 📈 **Benefits for Traders**

1. **Enhanced Analysis**: Two independent GANN calculations simultaneously
2. **Flexible Configuration**: Complete control over appearance and behavior
3. **Clear Visualization**: Distinct colors and styles for each input
4. **Professional Tools**: Advanced customization for serious technical analysis
5. **Time Efficiency**: Multiple analysis scenarios in one indicator

---

## 🏁 **Conclusion**

This update transforms the GANN Angles Levels indicator into a comprehensive dual-input analysis tool, providing traders with unprecedented flexibility and control over their GANN-based technical analysis while maintaining the simplicity and effectiveness of the original indicator.

**Perfect for traders who need to analyze multiple price levels, timeframes, or scenarios simultaneously with full visual customization.**

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.