OPEN-SOURCE SCRIPT

Williams Fractals and Alligator

已更新
The "Williams Fractals and Alligator" indicator is a technical analysis tool that combines two essential concepts: Williams Fractals and the Alligator oscillator, which help traders identify potential reversal points and trends in price action.

Components of the Indicator:
Fractals:

Definition: Fractals are patterns that indicate price reversals. An up fractal is formed when there is a high point surrounded by lower highs, while a down fractal is formed with a low point surrounded by higher lows.
User Input: The user can define the period for identifying fractals via an input parameter (n). The default value is set to 2.
Calculation Logic: The indicator uses nested loops to compare the current price against previous and subsequent prices based on the specified period. If the conditions for a fractal are met, it generates a signal.
Alligator:

Definition: The Alligator indicator consists of three lines: the Jaw, Teeth, and Lips, which represent different smoothed moving averages of the price.
User Input: Users can customize the length and offset of each of the Alligator lines:
Jaw Length: Default value of 13
Teeth Length: Default value of 8
Lips Length: Default value of 5
Offsets for each line adjust how far ahead the lines are plotted.
Calculation Logic: The indicator employs a custom Smoothed Moving Average (SMMA) function to calculate the values of the Jaw, Teeth, and Lips using the price source (typically the average of the high and low).
Plotting:

The indicator plots up fractals as upward triangles above the price bars (in teal) and down fractals as downward triangles below the price bars (in red).
The Alligator lines are plotted in different colors:
Jaw: Blue
Teeth: Red
Lips: Green
Each line is plotted with the ability to offset visually on the chart.
Purpose of the Indicator:
The primary use of this indicator is to identify potential entry and exit points in trading based on the fractal patterns while considering the prevailing trend indicated by the Alligator’s three lines.
Up fractals may signal potential buy opportunities, especially when positioned in an uptrend indicated by the Alligator lines.
Conversely, down fractals may signal potential sell opportunities, particularly in a downtrend.
Conclusion:
The "Williams Fractals and Alligator" indicator serves as a comprehensive tool for traders, combining fractal-based reversal signals with trend-following dynamics through the Alligator oscillator, thereby enhancing decision-making in trading strategies.
版本注释
Support and Resistance:

Configuration for showing support and resistance levels and calculations of those levels based on the specified length.
Plots support and resistance lines with specific color settings.
Alligator IndicatorBill Williams IndicatorsbillwilliamsindicatorsWilliams Fractal

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


更多:

免责声明