OPEN-SOURCE SCRIPT
تم تحديثه

Fibonacci Retracement/Extension

5 079
This Pine Script code implements Fibonacci retracement and extension levels based on a ZigZag pattern. Below is a breakdown of its functionality:

Overview
The script calculates Fibonacci retracement and extension levels by identifying swing highs and swing lows using the ZigZag algorithm. It then plots these levels on the chart for trend analysis.

1. ZigZag Length Input
Defines the ZigZag length, which determines the sensitivity of peak and trough identification.

2. Fibonacci Retracement Calculation
Computes Fibonacci retracement levels using swing highs and lows.
Uses pre-defined Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 0.786, 1.0).
Adjusts line positions dynamically as the trend evolves.

3. Fibonacci Extension Calculation
Identifies Fibonacci extension levels for future price targets.
Uses previous ZigZag patterns to estimate potential price movements.

4. Trend and Fibonacci Configuration
Allows the user to configure Fibonacci trend analysis.
TrendSw: Sets the trend direction (1 = Bullish, -1 = Bearish, 0 = None).
ZigZagleg: Determines the countback value for retracement calculations.
ملاحظات الأخبار
minor correction

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.