ZigZag Smart Trend [TradingFinder] Major & Minor Structured Wave🔵 Introduction
🟣 Zigzag
Zigzag is a lagging indicator; this indicator identifies points on a price chart that have more significant changes than its previous wave and then by connecting these lines to each other, it assists traders in trend detection.
This indicator reduces random price fluctuations and attempts to make the primary price trend clearer.
🟣 Pivot
Pivots are points where the price chart changes direction. Pivots, also called reversal points, form when supply and demand forces dominate one another.
Different types of technical analysis pivots can be introduced into two categories, minor pivots, and major pivots, each of which has a specific meaning in analysis.
Major Pivot : These pivots actually indicate major changes in the direction of the chart and occur at the end of trends. Analysts seeking to reach the primary analysis focus more on major pivot points. In fact, most technical analysis tools are examined and determined based on major pivots.
Minor Pivot : This type of pivot focuses more on small and subsidiary points and directions. Therefore, it occurs at the end of corrections. Analysts focusing on minor pivots represent small trends, and it should be noted that minor pivots are not suitable for use in primary technical tools.
How to identify minor and major pivots :
Minor pivots are pivots formed between two major pivots and fail to break the opposite major pivot.
Major pivots are pivots that have either successfully broken the opposite pivot or have moved more than the previous pivot of the same type.
🔵 How to use
Based on identifying pivots and drawing zigzag lines, you can have various uses for this indicator.
Identifying support and resistance levels :
Identifying Elliott Waves :
Identifying classic patterns :
Identifying pivots with higher validity :
Identifying internal and external breakouts :
Identifying trends and range areas :
Identifying pivot types along with major and minor recognition :
MHH : Major Higher High
MLH : Major Lower High
MLL : Major Lower Low
MHL : Major Higher Low
mHH : Minor Higher High
mLH : Minor Lower High
mLL : Minor Lower Low
mHL : Minor Higher Low
🔵 Settings
Pivot Period Zigzag Line : Using this input, you can determine the pivot period for identifying zigzag swings.
Show Zigzag Line : To show or not to show the zigzag line.
Zigzag Line Color : Change the color of the zigzag line.
Zigzag Line Style : Change the Style of the zigzag line.
Zigzag Line Width : Change the Width of the zigzag line.
Show Label : To show or not to show Pivot Type.
Color Label : Change the color of the Pivot Type Label.
Zigzagcorrrection
ZigZag Library [TradingFinder]🔵 Introduction
The "Zig Zag" indicator is an analytical tool that emerges from pricing changes. Essentially, it connects consecutive high and low points in an oscillatory manner. This method helps decipher price changes and can also be useful in identifying traditional patterns.
By sifting through partial price changes, "Zig Zag" can effectively pinpoint price fluctuations within defined time intervals.
🔵 Key Features
1. Drawing the Zig Zag based on Pivot points :
The algorithm is based on pivots that operate consecutively and alternately (switch between high and low swing). In this way, zigzag lines are connected from a swing high to a swing low and from a swing low to a swing high.
Also, with a very low probability, it is possible to have both low pivots and high pivots in one candle. In these cases, the algorithm tries to make the best decision to make the most suitable choice.
You can control what period these decisions are based on through the "PiPe" parameter.
2.Naming and labeling each pivot based on its position as "Higher High" (HH), "Lower Low" (LL), "Higher Low" (HL), and "Lower High" (LH).
Additionally, classic patterns such as HH, LH, LL, and HL can be recognized. All traders analyzing financial markets using classic patterns and Elliot Waves can benefit from the "zigzag" indicator to facilitate their analysis.
" HH ": When the price is higher than the previous peak (Higher High).
" HL ": When the price is higher than the previous low (Higher Low).
" LH ": When the price is lower than the previous peak (Lower High).
" LL ": When the price is lower than the previous low (Lower Low).
🔵 How to Use
First, you can add the library to your code as shown in the example below.
import TFlab/ZigZagLibrary_TradingFinder/1 as ZZ
Function "ZigZag" Parameters :
🟣 Logical Parameters
1. HIGH : You should place the "high" value here. High is a float variable.
2. LOW : You should place the "low" value here. Low is a float variable.
3. BAR_INDEX : You should place the "bar_index" value here. Bar_index is an integer variable.
4. PiPe : The desired pivot period for plotting Zig Zag is placed in this parameter. For example, if you intend to draw a Zig Zag with a Swing Period of 5, you should input 5.
PiPe is an integer variable.
Important :
Apart from the "PiPe" indicator, which is part of the customization capabilities of this indicator, you can create a multi-time frame mode for the indicator using 3 parameters "High", "Low" and "BAR_INDEX". In this way, instead of the data of the current time frame, use the data of other time frames.
Note that it is better to use the current time frame data, because using the multi-time frame mode is associated with challenges that may cause bugs in your code.
🟣 Setting Parameters
5. SHOW_LINE : It's a boolean variable. When true, the Zig Zag line is displayed, and when false, the Zig Zag line display is disabled.
6. STYLE_LINE : In this variable, you can determine the style of the Zig Zag line. You can input one of the 3 options: line.style_solid, line.style_dotted, line.style_dashed. STYLE_LINE is a constant string variable.
7. COLOR_LINE : This variable takes the input of the line color.
8. WIDTH_LINE : The input for this variable is a number from 1 to 3, which is used to adjust the thickness of the line that draws the Zig Zag. WIDTH_LINE is an integer variable.
9. SHOW_LABEL : It's a boolean variable. When true, labels are displayed, and when false, label display is disabled.
10. COLOR_LABEL : The color of the labels is set in this variable.
11. SIZE_LABEL : The size of the labels is set in this variable. You should input one of the following options: size.auto, size.tiny, size.small, size.normal, size.large, size.huge.
12. Show_Support : It's a boolean variable that, when true, plots the last support line, and when false, disables its plotting.
13. Show_Resistance : It's a boolean variable that, when true, plots the last resistance line, and when false, disables its plotting.
Suggestion :
You can use the following code snippet to import Zig Zag into your code for time efficiency.
//import Library
import TFlab/ZigZagLibrary_TradingFinder/1 as ZZ
// Input and Setting
// Zig Zag Line
ShZ = input.bool(true , 'Show Zig Zag Line', group = 'Zig Zag') //Show Zig Zag
PPZ = input.int(5 ,'Pivot Period Zig Zag Line' , group = 'Zig Zag') //Pivot Period Zig Zag
ZLS = input.string(line.style_dashed , 'Zig Zag Line Style' , options = , group = 'Zig Zag' )
//Zig Zag Line Style
ZLC = input.color(color.rgb(0, 0, 0) , 'Zig Zag Line Color' , group = 'Zig Zag') //Zig Zag Line Color
ZLW = input.int(1 , 'Zig Zag Line Width' , group = 'Zig Zag')//Zig Zag Line Width
// Label
ShL = input.bool(true , 'Label', group = 'Label') //Show Label
LC = input.color(color.rgb(0, 0, 0) , 'Label Color' , group = 'Label')//Label Color
LS = input.string(size.tiny , 'Label size' , options = , group = 'Label' )//Label size
Show_Support= input.bool(false, 'Show Last Support',
tooltip = 'Last Support' , group = 'Support and Resistance')
Show_Resistance = input.bool(false, 'Show Last Resistance',
tooltip = 'Last Resistance' , group = 'Support and Resistance')
//Call Function
ZZ.ZigZag(high ,low ,bar_index ,PPZ , ShZ ,ZLS , ZLC, ZLW ,ShL , LC , LS , Show_Support , Show_Resistance )
ZigZag reSampledthis indicator looks like the default ZigZag indicator but it uses the price action instead of the deviation%
ZigZag++Hey Awesome Traders
I noticed people were so happy with my ZigZag lucemanb script and so I made one that is more user-friendly and customizable
Please note the original one is dedicated to developers, The code is very minimal for fast understanding when anyone wants to use it in their development
In this script, I have included several features like multi-timeframe and alerts. Do take a look and enjoy
If you are using the indicator, please comment down the link to your script
If you would love to support my work through donations, Am so happy to receive them
ADDITIONAL FEATURES
Do u have an idea or a feature that you want to be added,
You can ping me or ask about it here, I can always update
Check out some of the best works i have done with this script
1. Angle trading
2. Harmonic Patterns
ZigZag - lucemanb
THIS CODE IS BASED FROM THE MT4 ZIGZAG INDICATOR
THE ZIGZAG SETTINGS FOR THE MAIN ONE ON TRADINGVIEW DO NOT WORK THE SAME AS MT4
I HOPE U LOVE IT
I have had tons of experience on the ZIGZAG indicator and thought this might help someone.
Enjoy this code. Zigzag is a good indicator in many ways and people underestimate it because of its repainting
Check out some work ave done with this script. This is some intense angle trading requested by someone