PROTECTED SOURCE SCRIPT
Telah dikemas kini FLD 3D

FLD 3D - Future Lines of Demarcation Indicator
═══════════════════════════════════════════════════
THEORETICAL FOUNDATION
═══════════════════════════════════════════════════
This indicator implements Future Lines of Demarcation (FLD), a key concept from J.M. Hurst's cyclic analysis theory. FLDs are price-based lines displaced forward in time by half the wavelength of a dominant cycle, creating a predictive framework for price movement analysis.
The core principle: when price crosses an FLD line, it indicates a potential change in the current cycle phase. FLDs act as dynamic support/resistance levels that "anticipate" where price should be based on the dominant cycle's rhythm.
═══════════════════════════════════════════════════
CALCULATION METHODOLOGY
═══════════════════════════════════════════════════
The indicator calculates three FLD lines:
1. FLD HIGH: Takes the bar's high price and shifts it forward by offset bars
2. FLD LOW: Takes the bar's low price and shifts it forward by offset bars
3. FLD MEDIAN: Calculates a median price using the selected method, then shifts forward
The offset is calculated as: offset = Period / 2
This displacement represents the half-cycle concept: if a cycle has a period of 48 bars, the FLD will be displaced 24 bars into the future. This creates a "lead" indicator that shows where price should theoretically be based on the cycle's wave pattern.
PRICE METHODS AVAILABLE:
- HL2: (High + Low) / 2 - Simple midpoint
- HLC3: (High + Low + Close) / 3 - Weighted with close
- HLCC4: (High + Low + Close + Close) / 4 - Close has double weight
- OHLC4: (Open + High + Low + Close) / 4 - Full bar average
- VWAP-like: Volume-weighted high/low average
- True Range: Uses previous close for range calculation
═══════════════════════════════════════════════════
AUTO-PERIOD ADJUSTMENT FEATURE
═══════════════════════════════════════════════════
The indicator includes multi-timeframe adaptation logic. When "Auto Period" is enabled:
1. Detects current chart timeframe (minutes, hours, days, weeks)
2. Compares it to the reference timeframe setting
3. Calculates adjustment ratio: Reference TF / Current TF
4. Applies ratio to base period: Adjusted Period = Base Period × Ratio
Example: If Base Period = 48, Reference TF = 60min, Current chart = 15min
→ Ratio = 60/15 = 4
→ Adjusted Period = 48 × 4 = 192 bars
This ensures the indicator tracks the same real-time cycle length across different chart timeframes, maintaining consistency in cycle analysis.
═══════════════════════════════════════════════════
VISUAL COMPONENTS
═══════════════════════════════════════════════════
- RED LINE: FLD High (upper boundary)
- BLUE LINE: FLD Low (lower boundary)
- ORANGE LINE: FLD Median (centerline)
- GRAY AREA: Fills between High and Low FLDs
- RIGHT LABEL: Shows FLD identifier and period used (asterisk indicates auto-adjustment)
All lines extend into the future by the calculated offset, creating a "projection zone" ahead of current price.
═══════════════════════════════════════════════════
ACKNOWLEDGMENTS
═══════════════════════════════════════════════════
This work is inspired by the Italian cyclic analysis community and dedicated educators. Due to TradingView's House Rules on promotional content, I cannot mention specific names or groups, but my gratitude goes to those who know they contributed to this development through their teaching and guidance. Thank Emiliano!
═══════════════════════════════════════════════════
THEORETICAL FOUNDATION
═══════════════════════════════════════════════════
This indicator implements Future Lines of Demarcation (FLD), a key concept from J.M. Hurst's cyclic analysis theory. FLDs are price-based lines displaced forward in time by half the wavelength of a dominant cycle, creating a predictive framework for price movement analysis.
The core principle: when price crosses an FLD line, it indicates a potential change in the current cycle phase. FLDs act as dynamic support/resistance levels that "anticipate" where price should be based on the dominant cycle's rhythm.
═══════════════════════════════════════════════════
CALCULATION METHODOLOGY
═══════════════════════════════════════════════════
The indicator calculates three FLD lines:
1. FLD HIGH: Takes the bar's high price and shifts it forward by offset bars
2. FLD LOW: Takes the bar's low price and shifts it forward by offset bars
3. FLD MEDIAN: Calculates a median price using the selected method, then shifts forward
The offset is calculated as: offset = Period / 2
This displacement represents the half-cycle concept: if a cycle has a period of 48 bars, the FLD will be displaced 24 bars into the future. This creates a "lead" indicator that shows where price should theoretically be based on the cycle's wave pattern.
PRICE METHODS AVAILABLE:
- HL2: (High + Low) / 2 - Simple midpoint
- HLC3: (High + Low + Close) / 3 - Weighted with close
- HLCC4: (High + Low + Close + Close) / 4 - Close has double weight
- OHLC4: (Open + High + Low + Close) / 4 - Full bar average
- VWAP-like: Volume-weighted high/low average
- True Range: Uses previous close for range calculation
═══════════════════════════════════════════════════
AUTO-PERIOD ADJUSTMENT FEATURE
═══════════════════════════════════════════════════
The indicator includes multi-timeframe adaptation logic. When "Auto Period" is enabled:
1. Detects current chart timeframe (minutes, hours, days, weeks)
2. Compares it to the reference timeframe setting
3. Calculates adjustment ratio: Reference TF / Current TF
4. Applies ratio to base period: Adjusted Period = Base Period × Ratio
Example: If Base Period = 48, Reference TF = 60min, Current chart = 15min
→ Ratio = 60/15 = 4
→ Adjusted Period = 48 × 4 = 192 bars
This ensures the indicator tracks the same real-time cycle length across different chart timeframes, maintaining consistency in cycle analysis.
═══════════════════════════════════════════════════
VISUAL COMPONENTS
═══════════════════════════════════════════════════
- RED LINE: FLD High (upper boundary)
- BLUE LINE: FLD Low (lower boundary)
- ORANGE LINE: FLD Median (centerline)
- GRAY AREA: Fills between High and Low FLDs
- RIGHT LABEL: Shows FLD identifier and period used (asterisk indicates auto-adjustment)
All lines extend into the future by the calculated offset, creating a "projection zone" ahead of current price.
═══════════════════════════════════════════════════
ACKNOWLEDGMENTS
═══════════════════════════════════════════════════
This work is inspired by the Italian cyclic analysis community and dedicated educators. Due to TradingView's House Rules on promotional content, I cannot mention specific names or groups, but my gratitude goes to those who know they contributed to this development through their teaching and guidance. Thank Emiliano!
Nota Keluaran
Release 1.2- Fixato il problema con offsett > 500
- ripulita l'impostazione grafica
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. However, you can use it freely and without any limitations – learn more here.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. However, you can use it freely and without any limitations – learn more here.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.