Fibonacci Circle Zones🟩 The  Fibonacci Circle Zones  indicator is a technical visualization tool, building upon the concept of traditional Fibonacci circles. It provides configurable options for analyzing geometric relationships between price and time, used to identify potential support and resistance zones derived from circle-based projections. The indicator constructs these  Fibonacci  circles based on two user-selected anchor points (Point A and Point B), which define the foundational price range and time duration for the geometric analysis.
Key features include multiple mathematical  Circle Formulas  for radius scaling and several options for defining the circle's center point, enabling exploration of complex, non-linear geometric relationships between price and time distinct from traditional linear Fibonacci analysis. Available formulas incorporate various mathematical constants (π, e, φ variants, Silver Ratio) alongside traditional Fibonacci ratios, facilitating investigation into different scaling hypotheses. Furthermore, selecting the  Center  point relative to the A-B anchors allows these circular time-price patterns to be constructed and analyzed from different geometric perspectives. Analysis can be further tailored through detailed customization of up to 12 Fibonacci levels, including their mathematical values, colors, and visibility..
  
📚  THEORY and CONCEPT  📚
Fibonacci circles represent an application of Fibonacci principles within technical analysis, extending beyond typical horizontal price levels by incorporating the dimension of time. These geometric constructions traditionally use numerical proportions, often derived from the Fibonacci sequence, to project potential zones of price-time interaction, such as support or resistance. A theoretical understanding of such geometric tools involves considering several core components: the significance of the chosen geometric origin or  center point , the mathematical principles governing the  proportional scaling  of successive radii, and the fundamental  calculation considerations  (like chart scale adjustments and base radius definitions) that influence the resulting geometry and ensure its accurate representation.
  
⨀  Circle Center  ⨀
The traditional construction methodology for Fibonacci circles begins with the selection of two significant anchor points on the chart, usually representing a key price swing, such as a swing low (Point A) and a subsequent swing high (Point B), or vice versa. This defined segment establishes the primary vector—representing both the price range and the time duration of that specific market move. From these two points, a base distance or radius is derived (this calculation can vary, sometimes using the vertical price distance, the time duration, or the diagonal distance). A  center point  for the circles is then typically established, often at the midpoint (time and price) between points A and B, or sometimes anchored directly at point B.
Concentric circles are then projected outwards from this center point. The radii of these successive circles are calculated by multiplying the base distance by key Fibonacci ratios and other standard proportions. The underlying concept posits that markets may exhibit harmonic relationships or cyclical behavior that adheres to these proportions, suggesting these expanding geometric zones could highlight areas where future price movements might decelerate, reverse, or find equilibrium, reflecting a potential proportional resonance with the initial defining swing in both price and time.
The  Fibonacci Circle Zones  indicator enhances traditional Fibonacci circle construction by offering greater analytical depth and flexibility: it addresses the origin point of the circles: instead of being limited to common definitions like the midpoint or endpoint B, this indicator provides a selection of distinct center point calculations relative to the initial A-B swing. The underlying idea is that the geometric  source  from which harmonic projections emanate might vary depending on the market structure being analyzed. This flexibility allows for experimentation with different center points (derived algorithmically from the A, B, and midpoint coordinates), facilitating exploration of how price interacts with circular zones anchored from various perspectives within the defining swing.
  
 Potential Center Points Setup : This view shows the anchor points  A  and  B , defined by the user, which form the basis of the calculations. The indicator dynamically calculates various potential  Center  points ( C  through  N , and  X ) based on the A-B structure, representing different geometric origins available for selection in the settings. 
Point X holds particular significance as it represents the calculated midpoint (in both time and price) between A and B. This 'X' point corresponds to the default 'Auto' center setting upon initial application of the indicator and aligns with the centering logic used in TradingView's standard Fibonacci Circle tool, offering a familiar starting point.
The other potential center points allow for exploring circles originating from different geometric anchors relative to the A-B structure. While detailing the precise calculation for each is beyond the scope of this overview, they can be broadly categorized: points C through H are derived from relationships primarily within the A-B time/price range, whereas points I through N represent centers  projected  beyond point B, extrapolating the A-B geometry. Point J, for example, is calculated as a reflection of the A-X midpoint projected beyond B. This variety provides a rich set of options for analyzing circle patterns originating from historical, midpoint, and extrapolated future anchor perspectives.
  
 Default Settings (Center X, FibCircle) : Using the default  Center  X (calculated midpoint) with the default  FibCircle . Although circles begin plotting only after Point B is established, their curvature shows they are geometrically centered on X. This configuration matches the standard TradingView Fib Circle tool, providing a baseline. 
  
 Centering on Endpoint B : Using Point B, the user-defined end of the swing, as the  Center . This anchors the circular projections directly to the swing's termination point. Unlike centering on the midpoint (X) or start point (A), this focuses the analysis on geometric expansion originating precisely  from  the conclusion of the measured A-B move. 
  
 Projected Center J : Using the projected Point J as the  Center . Its position is calculated based on the A-B swing (conceptually, it represents a forward projection related to the A-X midpoint relationship) and is located chronologically beyond Point B. This type of forward projection often allows complete circles to be visualized as price develops into the corresponding time zone. 
  
 Time Symmetry Projection (Center L) : Uses the projected Point L as the  Center . It is located at the price level of the start point (A), projected forward in time from B by the  full duration of the A-B swing . This perspective focuses analysis on  temporal symmetry , exploring geometric expansions from a point representing a full time cycle completion anchored back at the swing's origin price level. 
⭕  Circle Formula 
Beyond the  center point , the expansion of the projected circles is determined by the selected  Circle Formula . This setting provides different mathematical methods, or  scaling options , for scaling the circle radii. Each option applies a distinct mathematical constant or relationship to the base radius derived from the A-B swing, allowing for exploration of various geometric proportions.
 eScaled 
     Mathematical Basis:  Scales the radius by Euler's number ( e  ≈ 2.718), the base of natural logarithms. This constant appears frequently in processes involving continuous growth or decay.
     Enables investigation of market geometry scaled by  e , exploring relationships potentially based on natural exponential growth applied to time-price circles, potentially relevant for analyzing phases of accelerating momentum or volatility expansion. 
 FibCircle 
     Mathematical Basis:  Scales the radius to align with TradingView’s built-in Fibonacci Circle Tool.
     Provides a baseline circle size, potentially emulating scaling used in standard drawing tools, serving as a reference point for comparison with other options. 
 GoldenFib 
     Mathematical Basis:  Scales the radius by the Golden Ratio (φ ≈ 1.618).
     Explores the fundamental Golden Ratio proportion, central to Fibonacci analysis, applied directly to circular time-price geometry, potentially highlighting zones reflecting harmonic expansion or retracement patterns often associated with φ. 
 GoldenContour 
     Mathematical Basis:  Scales the radius by a factor derived from Golden Ratio geometry (√(1 + φ²) / 2 ≈ 0.951). It represents a specific geometric relationship derived from φ.
     Allows analysis using proportions linked to the geometry of the Golden Rectangle, scaled to produce circles very close to the initial base radius. This explores structural relationships often associated with natural balance or proportionality observed in Golden Ratio constructions. 
 SilverRatio 
     Mathematical Basis:  Scales the radius by the Silver Ratio (1 + √2 ≈ 2.414). The Silver Ratio governs relationships in specific regular polygons and recursive sequences.
     Allows exploration using the proportions of the Silver Ratio, offering a significant expansion factor based on another fundamental metallic mean for comparison with φ-based methods. 
 PhiDecay 
     Mathematical Basis:  Scales the radius by φ raised to the power of -φ (φ⁻ᵠ ≈ 0.53). This unique exponentiation explores a less common, non-linear transformation involving φ.
     Explores market geometry scaled by this specific phi-derived factor which is significantly less than 1.0, offering a distinct contractile proportion for analysis, potentially relevant for identifying zones related to consolidation phases or decaying momentum. 
 PhiSquared 
     Mathematical Basis:  Scales the radius by φ squared, normalized by dividing by 3 (φ² / 3 ≈ 0.873).
     Enables investigation of patterns related to the φ² relationship (a key Fibonacci extension concept), visualized at a scale just below 1.0 due to normalization. This scaling explores projections commonly associated with significant trend extension targets in linear Fibonacci analysis, adapted here for circular geometry. 
 PiScaled 
     Mathematical Basis:  Scales the radius by Pi (π ≈ 3.141).
     Explores direct scaling by the fundamental circle constant (π), investigating proportions inherent to circular geometry within the market's time-price structure, potentially highlighting areas related to natural market cycles, rotational symmetry, or full-cycle completions. 
 PlasticNumber 
     Mathematical Basis:  Scales the radius by the Plastic Number (approx 1.3247), the third metallic mean. Like φ and the Silver Ratio, it is the solution to a specific cubic equation and relates to certain geometric forms.
     Introduces another distinct fundamental mathematical constant for geometric exploration, comparing market proportions to those potentially governed by the Plastic Number. 
 SilverFib 
     Mathematical Basis:  Scales the radius by the reciprocal Golden Ratio (1/φ ≈ 0.618).
     Explores proportions directly related to the core 0.618 Fibonacci ratio, fundamental within Fibonacci-based geometric analysis, often significant for identifying primary retracement levels or corrective wave structures within a trend. 
 Unscaled 
     Mathematical Basis:  No scaling applied.
     Provides the base circle defined by points A/B and the Center setting without any additional mathematical scaling, serving as a pure geometric reference based on the A-B structure.
 
🧪  Advanced Calculation Settings 
Two advanced settings allow further refinement of the circle calculations: matching the chart's scale and defining how the base radius is calculated from the A-B swing.
The  Chart Scale  setting ensures geometric accuracy by aligning circle calculations with the chart's vertical axis display. Price charts can use either a standard (linear) or logarithmic scale, where vertical distances represent price changes differently. The setting offers two options:
 
 Standard : Select this option when the price chart's vertical axis is set to a standard linear scale.
 Logarithmic : It is necessary to select this option if the price chart's vertical axis is set to a logarithmic scale. Doing so ensures the indicator adjusts its calculations to maintain correct geometric proportions relative to the visual price action on the log-scaled chart.
 
The  Radius Calc  setting determines how the fundamental base radius is derived from the A-B swing, offering two primary options:
 
 Auto : This is the default setting and represents the traditional method for radius calculation. This method bases the radius calculation on the vertical  price range  of the A-B swing, focusing the geometry on the price amplitude.
 Geometric : This setting provides an  alternative  calculation method, determining the base radius from the  diagonal distance  between Point A and Point B. It considers both the price change and the time duration relative to the chart's aspect ratio, defining the radius based on the overall magnitude of the A-B price-time vector.
 
This choice allows the resulting circle geometry to be based either purely on the swing's vertical price range ( Auto ) or on its combined price-time movement ( Geometric ).
🖼️  CHART EXAMPLES  🖼️
  
 Default Behavior (X Center, FibCircle Formula) : This configuration uses the midpoint ( Center  X) and the  FibCircle  scaling  Formula , representing the indicator's effective default setup when 'Auto' is selected for both options initially. This is designed to match the output of the standard TradingView Fibonacci Circle drawing tool. 
  
 Center B with Unscaled Formula : This example shows the indicator applied to an uptrend with the  Center  set to Point B and the  Circle Formula  set to  Unscaled . This configuration projects the defined levels (0.236, 0.382, etc.) as arcs originating directly from the swing's termination point (B) without applying any additional mathematical scaling from the formulas. 
  
 Visualization with Projected Center J : Here, circles are centered on the projected point J, calculated from the A-B structure but located forward in time from point B. Notice how using this forward-projected origin allows complete inner circles to be drawn once price action develops into that zone, providing a distinct visual representation of the expanding geometric field compared to using earlier anchor points. ( Unscaled  formula used in this example). 
  
 PhiSquared Scaling from Endpoint B : The  PhiSquared  scaling  Formula  applied from the user-defined swing endpoint (Point B). Radii expand based on a normalized relationship with φ² (the square of the Golden Ratio), creating a unique geometric structure and spacing between the circle levels compared to other formulas like  Unscaled  or  GoldenFib . 
  
 Centering on Swing Origin (Point A) : Illustrates using Point A, the user-defined start of the swing, as the circle  Center . Note the significantly larger scale and wider spacing of the resulting circles. This difference occurs because centering on the swing's origin (A) typically leads to a larger base  radius  calculation compared to using the midpoint (X) or endpoint (B). ( Unscaled  formula used). 
  
 Center Point D : Point D, dynamically calculated from the A-B swing, is used as the origin ( Center =D). It is specifically located at the price level of the swing's start point (A) occurring precisely at the time coordinate of the swing's end point (B). This offers a unique perspective, anchoring the geometric expansion to the initial price level at the exact moment the defining swing concludes. ( Unscaled  formula shown). 
  
 Center Point G : Point G, also dynamically calculated from the A-B swing, is used as the origin ( Center =G). It is located at the price level of the swing's endpoint (B) occurring at the time coordinate of the start point (A). This provides the complementary perspective to Point D, anchoring the geometric expansion to the  final price level achieved  but originating from the  moment the swing began . As observed in the example, using Point G typically results in very wide circle projections due to its position relative to the core A-B action. ( Unscaled  formula shown). 
  
 Center Point I: Half-Duration Projection : Using the dynamically calculated Point I as the  Center . Located at Point B's price level but projected forward in time by  half the A-B swing duration , Point I's calculated time coordinate often falls outside the initially visible chart area. As the chart progresses, this origin point will appear, revealing large, sweeping arcs representing geometric expansions based on a  half-cycle temporal projection  from the swing's endpoint price. ( Unscaled  formula shown). 
  
 Center Point M : Point M, also dynamically calculated from the A-B swing, serves as the origin ( Center =M). It combines the  midpoint price level  (derived from X) with a time coordinate projected forward from Point B by the  full duration of the A-B swing . This perspective anchors the geometric expansion to the swing's balance price level but originates from the completion point of a full temporal cycle relative to the A-B move. Like other projected centers, using M allows for complete circles to be visualized as price progresses into its time zone. ( SilverFib  formula shown). 
  
 Geometric Validation & Functionality : Comparing the indicator (red lines), using its default settings ( Center  X,  FibCircle   Formula ), against TradingView's standard Fib Circle tool (green lines/white background). The precise alignment, particularly visible at the 1.50 and 2.00 levels shown, validates the core geometry calculation. 
🛠️  CONFIGURATION AND SETTINGS  🛠️
The  Fibonacci Circle Zones  indicator offers a range of configurable settings to tailor its functionality and visual representation. These options allow customization of the circle origin, scaling method, level visibility, visual appearance, and input points.
 Center and Formula 
  
 Settings for selecting the circle origin and scaling method. 
 
   Center : Dropdown menu to select the origin point for the circles.
       Auto : Automatically uses point X (the calculated midpoint between A and B).
      Selectable points including start/end (A, B), midpoint (X), plus various points derived from or projected beyond the A-B swing (C-N).  
   Circle Formula : Dropdown menu to select the mathematical method for scaling circle radii.
       Auto : Automatically selects a default formula ('FibCircle' if Center is 'X', 'Unscaled' otherwise).
     Includes standard Fibonacci scaling ( FibCircle, GoldenFib ), other mathematical constants ( PiScaled, eScaled ), metallic means ( SilverRatio ), phi transformations ( PhiDecay, PhiSquared ), and others. 
 
 Fib Levels 
  
 Configuration options for the 12 individual Fibonacci levels. 
 
 Advanced Settings 
  
 Settings related to core calculation methods. 
 
   Radius Calc : Defines how the base radius is calculated (e.g., 'Auto' for vertical price range, 'Geometric' for diagonal price-time distance).
   Chart Scale : Aligns circle calculations with the chart's vertical axis setting ('Standard' or 'Logarithmic') for accurate visual proportions.
 
 Visual Settings 
  
 Settings controlling the visual display of the indicator elements. 
 
   Plots : Dropdown controlling which parts of the calculated circles are displayed ( Upper ,  All , or  Lower ).
   Labels : Dropdown controlling the display of the numerical level value labels ( All ,  Left ,  Right , or  None ).
   Setup : Dropdown controlling the visibility of the initial setup graphics ( Show  or  Hide ).
   Info : Dropdown controlling the visibility of the small information table ( Show  or  Hide ).
   Text Size : Adjusts the font size for all text elements displayed by the indicator (Value ranges from 0 to 36).
   Line Width : Adjusts the width of the circle plots (1-10).
 
 Time/Price 
  
 Inputs for the anchor points defining the base swing. 
These settings define the start (Point A) and end (Point B) of the price swing used for all calculations.
 
   Point A (Time, Price) : Input fields for the exact time coordinate and price level of the swing's starting point (A).
   Point B (Time, Price) : Input fields for the exact time coordinate and price level of the swing's ending point (B).
   Interactive Adjustment : Points A and B can typically be adjusted directly by clicking and dragging their markers on the chart (if 'Setup' is set to 'Show'). Changes update settings automatically.
 
📝  NOTES  📝
Fibonacci circles begin plotting only once the time corresponding to Point B has passed and is confirmed on the chart. While potential center locations might be visible earlier (as shown in the setup graphic), the final circle calculations require the complete geometry of the A-B swing. This approach ensures that as new price bars form, the circles are accurately rendered based on the finalized A-B relationship and the chosen center and scaling.
The indicator's calculations are anchored to user-defined start (A) and end (B) points on the chart. When switching between charts with significantly different price scales (e.g., from an index at 5,000 to a crypto asset at $0.50), it is typically necessary to adjust these anchor points to ensure the circle elements are correctly positioned and scaled.
⚠️  DISCLAIMER  ⚠️
The  Fibonacci Circle Zones  indicator is a visual analysis tool designed to illustrate Fibonacci relationships through geometric constructions incorporating curved lines, providing a structured framework for identifying potential areas of price interaction. Like all technical and visual indicators, these visual representations may visually align with key price zones in hindsight, reflecting observed price dynamics. It is not intended as a predictive or standalone trading signal indicator.
The indicator calculates levels and projections using user-defined anchor points and Fibonacci ratios. While it aims to align with TradingView’s standard Fibonacci circle tool by employing mathematical and geometric formulas, no guarantee is made that its calculations are identical to TradingView's proprietary methods.
🧠  BEYOND THE CODE  🧠
The  Fibonacci Circle Zones  indicator, like other  xxattaxx indicators , is designed with education and community collaboration in mind. Its open-source nature encourages exploration, experimentation, and the development of new Fibonacci and grid calculation indicators and tools. We hope this indicator serves as a framework and a starting point for future Innovation and discussions.
Harmonicpattren
Gartley Harmonic Pattern [TradingFinder] Harmonic Chart patterns🔵 Introduction 
Research by H.M. Gartley and Scott Carney emphasizes the importance of harmonic patterns in technical analysis for predicting market movements. Gartley's work, particularly the Gartley 222 pattern, is detailed in his book "Profits in the Stock Market" and relies on the specific placement of points X, A, B, C, and D. 
🟣 Defining the Gartley Pattern 
The Gartley pattern is a powerful technical analysis tool often seen at the end of a trend, signaling a potential reversal. Ideally, it forms during the first and second waves of Elliott Wave theory, with wave XA representing wave 1 and the entire ABCD correction representing wave 2.
 While patterns outside this structure are also valid, the key points of the Gartley pattern align closely with Fibonacci retracement levels. Specifically, point B corrects wave XA to the 61.8% level, point C lies between 38% and 79% of wave AB, and point D extends between 113% and 162% of wave BC. 
The bullish Gartley pattern, shown below, forms at the end of a downtrend and signals a potential buying opportunity.
 Bullish :
  
 Bearish :
  
🔵 How to Use  
🟣 Bullish Gartley Pattern 
To spot a bullish Gartley pattern, follow these rules: the move from point X to point A (the first leg) must be upward. The subsequent move from point A to point B is downward, followed by an upward move from point B to point C. 
Finally, the move from point C to point D is downward. On a chart, this pattern resembles the letter M. After the final leg of this pattern, prices are expected to rise from point D.
  
🟣 Bearish Gartley Pattern 
A bearish Gartley pattern forms similarly to the bullish one but in reverse. The initial move from point X to point A should be downward. The next move from point A to point B is upward, followed by a downward move from point B to point C. 
The final leg moves upward from point C to point D. This pattern appears as a W on charts, indicating that prices are likely to fall from point D after the final move.
  
By understanding and identifying Gartley patterns, traders can enhance their technical analysis and improve their decision-making in financial markets. These patterns, when correctly identified, offer significant insights into potential market reversals and continuation patterns.
🔵 Setting 
🟣 Logical Setting 
 ZigZag Pivot Period : You can adjust the period so that the harmonic patterns are adjusted according to the pivot period you want. This factor is the most important parameter in pattern recognition.
 Show Valid Format : If this parameter is on "On" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "Off" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern
  
 Show Formation Last Pivot Confirm : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the latest pattern seeing and a sharp reduction in reward to risk.
 Period of Formation Last Pivot : Using this parameter you can determine that the last pivot is based on Pivot period. 
  
🟣 Genaral Setting 
 Show : Enter "On" to display the template and "Off" to not display the template.
 Color : Enter the desired color to draw the pattern in this parameter.
 LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
 LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Alert Setting 
 Alert : On / Off
 Message Frequency : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
 Show Alert Time by Time Zone : The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default. 
Harmonic Patterns Library [TradingFinder]🔵 Introduction 
Harmonic patterns blend geometric shapes with Fibonacci numbers, making these numbers fundamental to understanding the patterns.
One person who has done a lot of research on harmonic patterns is Scott Carney.Scott Carney's research on harmonic patterns in technical analysis focuses on precise price structures based on Fibonacci ratios to identify market reversals. 
Key patterns include the Gartley, Bat, Butterfly, and Crab, each with specific alignment criteria. These patterns help traders anticipate potential market turning points and make informed trading decisions, enhancing the predictability of technical analysis.
🟣 Understanding 5-Point Harmonic Patterns 
In the current library version, you can easily draw and customize most XABCD patterns. These patterns often form M or W shapes, or a combination of both. By calculating the Fibonacci ratios between key points, you can estimate potential price movements. 
All five-point patterns share a similar structure, differing only in line lengths and Fibonacci ratios. Learning one pattern simplifies understanding others.
  
🟣 Exploring the Gartley Pattern 
The Gartley pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Gartley, point X is below point D, and point A surpasses point C. Point D marks the start of a strong upward trend, making it an optimal point to place a buy order. 
The bearish Gartley mirrors the bullish pattern with inverted Fibonacci ratios. In this scenario, point D indicates the start of a significant price drop. Traders can place sell orders at this point and buy at lower prices for profit in two-way markets.
🟣 Analyzing the Butterfly Pattern 
The Butterfly pattern also manifests in bullish (M shape) and bearish (W shape) forms. It resembles the Gartley pattern but with point D lower than point X in the bullish version. 
The Butterfly pattern involves deeper price corrections than the Gartley, leading to more significant price fluctuations. Point D in the bullish Butterfly indicates the beginning of a sharp price rise, making it an entry point for buy orders. 
The bearish Butterfly has inverted Fibonacci ratios, with point D marking the start of a sharp price decline, ideal for sell orders followed by buying at lower prices in two-way markets.
🟣 Insights into the Bat Pattern 
The Bat pattern, appearing in bullish (M shape) and bearish (W shape) forms, is one of the most precise harmonic patterns. It closely resembles the Butterfly and Gartley patterns, differing mainly in Fibonacci levels. 
The bearish Bat pattern shares the Fibonacci ratios with the bullish Bat, with an inverted structure. Point D in the bearish Bat marks the start of a significant price drop, suitable for sell orders followed by buying at lower prices for profit.
🟣 The Crab Pattern Explained 
The Crab pattern, found in both bullish (M shape) and bearish (W shape) forms, is highly favored by analysts. Discovered in 2000, the Crab pattern features a larger final wave correction compared to other harmonic patterns. 
The bearish Crab shares Fibonacci ratios with the bullish version but in an inverted form. Point D in the bearish Crab signifies the start of a sharp price decline, making it an ideal point for sell orders followed by buying at lower prices for profitable trades.
🟣 Understanding the Shark Pattern 
The Shark pattern appears in bullish (M shape) and bearish (W shape) forms. It differs from previous patterns as point C in the bullish Shark surpasses point A, with unique level measurements. 
The bearish Shark pattern mirrors the Fibonacci ratios of the bullish Shark but is inverted. Point D in the bearish Shark indicates the start of a sharp price drop, ideal for placing sell orders and buying at lower prices to capitalize on the pattern.
🟣 The Cypher Pattern Overview 
The Cypher pattern is another that appears in both bullish (M shape) and bearish (W shape) forms. It resembles the Shark pattern, with point C in the bullish Cypher extending beyond point A, and point D forming within the XA line. 
The bearish Cypher shares the Fibonacci ratios with the bullish Cypher but in an inverted structure. Point D in the bearish Cypher marks the start of a significant price drop, perfect for sell orders followed by buying at lower prices.
🟣 Introducing the Nen-Star Pattern 
The Nen-Star pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Nen-Star, point C extends beyond point A, and point D, the final point, forms outside the XA line, making CD the longest wave. 
The bearish Nen-Star has inverted Fibonacci ratios, with point D indicating the start of a significant price drop. Traders can place sell orders at point D and buy at lower prices to profit from this pattern in two-way markets.
The 5-point harmonic patterns, commonly referred to as XABCD patterns, are specific geometric price structures identified in financial markets. These patterns are used by traders to predict potential price movements based on historical price data and Fibonacci retracement levels. 
 Here are the main 5-point harmonic patterns :
 
 Gartley Pattern
 Anti-Gartley Pattern
 Bat Pattern
 Anti-Bat Pattern
 Alternate Bat Pattern
 Butterfly Pattern
 Anti-Butterfly Pattern
 Crab Pattern	
 Anti-Crab Pattern
 Deep Crab Pattern
 Shark Pattern
 Anti- Shark Pattern
 Anti Alternate Shark Pattern
 Cypher Pattern
 Anti-Cypher Pattern
 
 
🔵 How to Use 
To add "Order Block Refiner Library", you must first add the following code to your script.
 import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP 
🟣 Parameters 
 XABCD(Name, Type, Show, Color, LineWidth, LabelSize, ShVF, FLPC, FLPCPeriod, Pivot, ABXAmin, ABXAmax, BCABmin, BCABmax, CDBCmin, CDBCmax, CDXAmin, CDXAmax) =>
Parameters: 
Name (string) 
Type (string) 
Show (bool) 
Color (color) 
LineWidth (int) 
LabelSize (string) 
ShVF (bool) 
FLPC (bool) 
FLPCPeriod (int) 
Pivot (int) 
ABXAmin (float) 
ABXAmax (float) 
BCABmin (float) 
BCABmax (float) 
CDBCmin (float) 
CDBCmax (float) 
CDXAmin (float) 
CDXAmax (float)
 
🟣 Genaral Parameters 
 Name : The name of the pattern.
 Type:  Enter "Bullish" to draw a Bullish pattern and "Bearish" to draw an Bearish pattern.
 Show : Enter "true" to display the template and "false" to not display the template.
 Color : Enter the desired color to draw the pattern in this parameter.
 LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
 LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Logical Parameters 
 ShVF : If this parameter is on "true" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "false" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
  
 FLPC : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the lateest pattern seeing and a sharp reduction in reward to risk.
 FLPCPeriod : Using this parameter you can determine that the last pivot is based on Pivot period.
  
 Pivot : You need to determine the period of the zigzag indicator. This factor is the most important parameter in pattern recognition.
 ABXAmin : Minimum retracement of "AB" line compared to "XA" line.
 ABXAmax : Maximum retracement of "AB" line compared to "XA" line.
 BCABmin : Minimum retracement of "BC" line compared to "AB" line.
 BCABmax : Maximum retracement of "BC" line compared to "AB" line.
 CDBCmin : Minimum retracement of "CD" line compared to "BC" line.
 CDBCmax : Maximum retracement of "CD" line compared to "BC" line.
 CDXAmin : Minimum retracement of "CD" line compared to "XA" line.
 CDXAmax : Maximum retracement of "CD" line compared to "XA" line.
  
  
🟣 Function Outputs 
This library has two outputs. The first output is related to the alert of the formation of a new pattern. And the second output is related to the formation of the candlestick pattern and you can draw it using the "plotshape" tool.
 Candle Confirmation Logic :
  
 Example :
 import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP
PP = input.int(3, 'ZigZag Pivot Period')
ShowBull = input.bool(true, 'Show Bullish Pattern')
ShowBear = input.bool(true, 'Show Bearish Pattern')
ColorBull = input.color(#0609bb, 'Color Bullish Pattern')
ColorBear = input.color(#0609bb, 'Color Bearish Pattern')
LineWidth = input.int(1 , 'Width Line')
LabelSize = input.string(size.small , 'Label size' , options =  )
ShVF = input.bool(false , 'Show Valid Format')
FLPC = input.bool(false , 'Show Formation Last Pivot Confirm')
FLPCPeriod =input.int(2, 'Period of Formation Last Pivot')
//Call function
  = HP.XABCD('Bullish Bat', 'Bullish', ShowBull, ColorBull , LineWidth, LabelSize ,ShVF,  FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
  = HP.XABCD('Bearish Bat', 'Bearish', ShowBear, ColorBear , LineWidth, LabelSize ,ShVF,  FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
//Alert
if BearAlert
    alert('Bearish Harmonic')
if BullAlert
    alert('Bulish Harmonic')
//CandleStick Confirm
plotshape(BearCandleConfirm, style = shape.arrowdown, color = color.red)
plotshape(BullCandleConfirm, style = shape.arrowup, color = color.green, location = location.belowbar )
 
Wolfe Wave Detector [LuxAlgo]The  Wolfe Wave Detector  displays occurrences of Wolfe Waves, alongside a target line. A multiple swing detection approach is used to maximize the number of detected waves. 
The indicator includes a dashboard with the number of detected waves, as well as the number of reached targets. 
🔶  USAGE 
  
The Wolfe Wave pattern is a chart pattern composed of five segments, with the initial segment extremities (points XABCD) forming a channel containing price variations.
After the price reaches point  D , we can expect a reversal toward a target line (point  E ). The target line is obtained by connecting and extending point  X -> C .
  
The script draws the  XABCD  pattern and a projection of where  E  might potentially be located. 
The projection is derived from the intersection between the target line and a line starting from  D , parallel to  B-C . From this line, margins are added, left and right, creating a wedge-shaped figure in most cases.
When the price passes the target line, this is highlighted by a dot. The dot and pattern are green by default when the target is above  D  and red when the target is below  D . Colors can be edited in the settings. The dashed target line is colored in the opposite color.
As seen in the above example, the price trend can reverse after reaching the target line.  
🔹  Symmetry 
Ideally, the  Wolfe Wave  must have a degree of symmetry; every upward line should have a similar angle to the other upward lines, and the same should be true for the downward lines. 
Also, the lines forming the channel should be as parallel as possible.
  
Users have the option to adjust the tolerance:
 
 Margin controls the wave symmetry of the pattern
 Angle controls the channel symmetry of the pattern
 
It's important to note that in both cases, a lower number will lead to more symmetrical patterns, but they may appear less frequently. 
It is also important to note that increasing the Margin can delay validating the pattern. In the meantime, the price could surpass the channel in the opposite direction, invalidating and deleting the otherwise valid pattern.
  
🔹  Multiple Swings 
  
Users can set a  Minimum Swing length  (for example 2) and a  Maximum Swing length  (for example 100) which defines the range of the swing point detection length, higher values for these settings will detect longer-term  Wolfe  patterns, while a larger range will allow for the detection of a larger number of patterns. 
By using multiple swings, it is possible to find smaller next to larger patterns at the same time.
  
The dashboard shows the number of patterns found and targets reached. When, for example, bullish patterns are disabled in the settings, the dashboard only shows the results of bearish patterns.
🔹  Extend Target Line 
The publication includes a setting that allows the  Target Line  to be extended up to 50 bars further. As seen in the above example, the  Target Line  can still be reached even after the pattern has been finalized. Once the  Target Line  is reached, it won't be updated further.
  
Here is another example of a  Target Line  being reached later on. 
The  Target Line  acted as a support level, after which where the price changed direction.
🔹  Show Progression 
  
An option is included to show the progression before the pattern is completed. Users can make use of the  XABC  pattern or visualize where point  D  should be positioned.
The focus lies on the bar range (between the left and right borders of the grey rectangle). The pattern is considered invalid and deleted when point  D  is beyond these limits. The height of the rectangle is optional. Ideally, the price should be located between the top and bottom of the rectangle, but it is not mandatory.
Show Progression has three options including:
 
 Full: Show all lines of  XABC  plus line  C-D  and rectangle for the position of point  D 
 Partial: Show line  C-D  and rectangle for the position of point  D 
 None: Only show valid completed patterns
 
The 'Partial' option in the 'Show Progression' feature is designed to help users locate the desired position of point  D  without the visual clutter caused by the  XABC  lines. This can be useful for those who prefer a cleaner visual representation of the evolving pattern.
🔶  SETTINGS 
🔹  Swing Length 
 
 Minimum: Minimum length used for the swing detection.
 Maximum Swing Length: Maximum length used for the swing detection.
  
🔹  Tolerance 
 
 Margin: Influences the symmetry of the pattern; with a higher number allowing for less symmetry.
 Angle:  Influences the symmetry of the channel; with a higher number allowing for less symmetry.
  
🔹  Style 
 
 Toggle: Bullish/Bearish + colors
 Extend Target Line: Extend a maximum of 50 bars or until Target Line is reached
 Show Progression: Show pattern progression
 Dot Size: The size of the dot when the Target Line is reached
  
🔹  Dashboard 
 
 Show Dashboard: Toggle dashboard which shows the number of found patterns and targets reached.
 Location: Location of the dashboard on the chart.
 Text Size: Text size.
  
🔹  Calculation 
 
 Calculated Bars: Allows the usage of fewer bars for performance/speed improvement
  
Smart Money Setup 04 [TradingFinder] Three Drive (Harmonic) + OB🔵 Introduction 
The "Three Drive" pattern is a well-known formation in technical analysis, recognized for its ability to signal potential trend reversals in price action. Within the realm of trading, particularly in the context of "Reversal Patterns," the Three Drive pattern holds significance as a reliable indicator of shifts in market sentiment.
🟣 Bullish 3 Drive 
This pattern typically manifests at a price bottom, where a sequence of lower lows suggests a prevailing negative trend. However, within the structure of the Three Drive pattern, a notable occurrence unfolds. 
The second low breaches the range of the first low, followed by the third low surpassing the range of the second low. These penetrations signify a diminishing selling pressure and an emerging buying interest. 
Traders often await the confirmation of the third low surpassing the second low as an entry point, with price targets set at the highs formed within the Three Drive pattern.
  
🟣 Bearish 3 Drive 
Conversely, the Bearish Three Drive pattern emerges at a price top, characterized by a sequence of higher highs indicating an upward trend. Yet, amidst this apparent bullish momentum, a shift occurs. 
The second high breaks beyond the range of the first high, succeeded by the third high exceeding the range of the second high. These breaches signify a waning buying strength and a resurgence in selling pressure. 
Entry into a trade is often executed after the confirmation of the third high surpassing the second high, with targets set at the lows formed within the Three Drive pattern.
  
 Importance :
Understanding the Three Drive pattern's significance extends beyond mere technical analysis. It bears resemblance to other established patterns, such as the Harmonic Pattern and Ending Diagonal within the Elliott Wave Theory. 
Recognizing these parallels aids traders in comprehending broader market dynamics and potential price movements.
🔵 Formation of 3 Drive in Order Block Zone 
The convergence of the Three Drive pattern with the concept of the Order Block Zone introduces a nuanced layer to traders' analytical approach. 
In "Price Action" methodology, Order Blocks represent areas on the price chart where significant market players, such as institutional traders, have executed notable orders. 
These zones often act as barriers, with price encountering resistance or support upon reaching them.
When the Three Drive pattern forms within an Order Block Zone, it signifies a confluence of market dynamics. 
The completion of the pattern within this zone suggests a potential reversal in the prevailing trend, augmented by the presence of significant institutional orders. 
Traders incorporate these Order Blocks into their analysis to identify probable levels where price may change direction, enhancing the reliability of their trading decisions.
🔵 How to Use :
To effectively utilize the Three Drive pattern within the Order Block Zone, traders seek alignment between the completion of the pattern and the presence of significant Order Blocks. 
This convergence enhances the reliability of the pattern's signals, increasing the likelihood of successful trade outcomes.
 Bullish Three Drive in Demand Zone :
  
 Bearish Three Drive in Supply Zone :
  
 Settings :
You can set your desired "Pivot Period" via settings for the indicator to identify setups based on it.
Three Drive [TradingFinder] 3 Drive Harmonic Pattern Indicator🔵 Introduction 
The "Three Drive" pattern is one of the light "RTM" setups suitable for identifying price trend reversals. For this reason, this pattern is considered one of the "Reversal Patterns."
🟣 Bullish 3 Drive 
At a price bottom, a formation occurs where the negative trend appears to continue, and lower lows are made. 
However, the second low penetrates the range of the first low, and the third low penetrates the range of the second low, indicating a decrease in selling pressure and an increase in buying pressure. 
Entry point is issued after the penetration of the third low to the second low, and targets are the highs formed in the "3 Drive."
  
🟣 Bearish 3 Drive 
At a price top, a formation occurs where the positive trend appears to continue, and higher highs are made. 
However, the second high penetrates the range of the first high, and the third high penetrates the range of the second high, indicating a decrease in buyers' strength and an increase in sellers' strength. 
Entry point is issued after the penetration of the third high to the second high, and targets are the lows formed in the "3 Drive."
  
 Importance : 
This pattern bears a striking resemblance to the some of "Harmonic Pattern" and "Ending Diagonal" in the "Elliott Pattern".
🔵 How to Use 
There is no need for further confirmation to use this pattern, and you can use it as soon as the pattern forms. However, to reduce errors, it is better to use this pattern when it forms within a "Supply and Demand" or "Support and Resistance" structure.
 Bullish 3 Drive in Demand Zone :
 Bearish 3 Drive in Supply Zone :
🔵 Settings 
You can set your desired "Pivot Period" via settings for the indicator to identify setups based on it.
HSupertrendLibrary   "HSupertrend" 
Supertrend implementation based on harmonic patterns
 hsupertrend(zProperties, pProperties, errorPercent, showPatterns, patternColor) 
  derives supertrend based on harmonic patterns
  Parameters:
     zProperties : ZigzagProperties containing Zigzag length and source array
     pProperties : PatternProperties used for calculation
     errorPercent : Error threshold for scanning patterns
     showPatterns : Draw identified patterns structure on chart
     patternColor : Color of the pattern lines to be drawn
  Returns:  
 ZigzagProperties 
  ZigzagProperties contains values required for zigzag calculation
  Fields:
     length : Zigzag length
     source : Array containing custom OHLC. If not set, array.from(high, low) is used
 PatternProperties 
  PatternProperties are essential pattern parameters used for calculation of bullish and bearish zones
  Fields:
     base : Base for calculating entry and stop of pattern. Can be CD, minmax or correction. Default is CD
     entryPercent : Distance from D in terms of percent of Base in the direction of pattern
     stopPercent : Distance from D in terms of percent of Base in the opposite direction of pattern
     useClosePrices : When set uses close price for calculation of supertrend breakout
Impactful pattern and candles pattern AlertThe Alertion indicator! 
impactful pattern: 
  pattern that happen near the zone or in the zone at lower timeframe and give us entry and stop limit price.
  It is helpful for price action traders and those who want to decrease their risk.
  There are 3 IP patterns:
   
Quasimodo
  
Head and shoulder
  
whipsaw engulfing
These patterns may occur near the zone or may not occur but by them, you can decrease your trading risk for example you can 
trade with half lot before IP pattern and enter with other half after pattern.
 
 how to use? 
for example:
  you find zone at 1h timeframe for short position
  when price enter to your zone 
  you run this indicator and choose your lower timeframe, for example 15m and click on short position.  
  Then make the alert by right-click on your chart and choose the add alert and at condition box choose the impactful pattern and then click on create
  now wait for message :)
Candles pattern:
  like reversal bar, key reversal bar, exhaustion bar, pin bar,  two-bar reversal, tree-bar reversal, inside bar, outside bar
  these occur when the trend turn, so it is usable when the price enter to your zone or near your zone.
  This pattern can decrease your risk.
 
Inside bar and outside bar:
  if this pattern engulf up, it is bullish pattern and if engulf down, it is bearish pattern.
               what does this indicator do? 
  this indicator is for making alert 
  it helps you to decrease your risk and failure.
  You optimize it to alert you when IP pattern happen or candle pattern happen or inside bar or outside bar engulfing or all of them.
  For IP pattern, it will message you entry and stop limit price.
  It works at 2 different timeframes, so you can make alert for example in 1h TF for candles pattern and 15m TF for IP pattern.
  Indicator will alert you for candles pattern at your chart timeframe and for IP pattern at timeframe you've chosen when you run the indicator, and it is changeable
  in setting.
              setting options 
   TIMEFRAME 
IP: select the timeframe for IP patterns it means when IP pattern happen at that timeframe the indicator will alert you
     example = your TF is 1h, you found the supply zone and want to trade, note that IP pattern happen in lower TF, so you select 15m TF or TF lower than 1h.
Short position: select it if you want to make short position. 
   BUFFERING 
indicator send you entry and stop limit price
you can change it by amount of percent 
it is your strategy to change your entry and stop loss or not
  example= in head and shoulder pattern at short position, the stop limit is high price of head in pattern
                 so the indicator will message you the exact price but if you want to put 
                 your stop limit 5 percent upper than exact price you can enter 5 in front of stop loss
                 or you want to enter 5 percent lower than exact high price of shoulder, you can optimize it.
  
   ALERTION 
you choose what alert you want 
IP alert or candle alert or inside and outside bar alert
   type your text for alert 
you can write additional text for your message 
   ADVANCE 
IP alert frequency option: 
  1. Once per bar : indicator will alert you for IP pattern once at your chat timeframe bar, and you should wait til next bar for next alert.
  2. Once per bar close : alert you when your chart timeframe bar closed and next alert will happen when next bar is closed.
  3. All: alert you all the times IP pattern happen 
pivot left and right bars: lower will find smaller pattern
   at the END: 
  this indicator is not strategy
  it is part of your strategy that help you to increase your winning rate.
  It is helpful for scalping and candle patterns finding.
  After you make an alert, you can delete the indicator or change your timeframe or make another alert, your previous alert won’t change.
Thank you all.
harmonicpatternsLibrary   "harmonicpatterns" 
harmonicpatterns: methods required for calculation of harmonic patterns. These are customised to be used in my scripts. But, also simple enough for others to make use of :)
 isGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isGartleyPattern: Checks for harmonic pattern Gartley
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Gartley. False otherwise.
 isBatPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isBatPattern: Checks for harmonic pattern Bat
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Bat. False otherwise.
 isButterflyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isButterflyPattern: Checks for harmonic pattern Butterfly
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Butterfly. False otherwise.
 isCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isCrabPattern: Checks for harmonic pattern Crab
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Crab. False otherwise.
 isDeepCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isDeepCrabPattern: Checks for harmonic pattern DeepCrab
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is DeepCrab. False otherwise.
 isCypherPattern(xabRatio, axcRatio, xadRatio, err_min, err_max)  isCypherPattern: Checks for harmonic pattern Cypher
  Parameters:
     xabRatio : AB/XA
     axcRatio : XC/AX
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Cypher. False otherwise.
 isSharkPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isSharkPattern: Checks for harmonic pattern Shark
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Shark. False otherwise.
 isNenStarPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isNenStarPattern: Checks for harmonic pattern Nenstar
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Nenstar. False otherwise.
 isAntiNenStarPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiNenStarPattern: Checks for harmonic pattern Anti NenStar
  Parameters:
     xabRatio : - AB/XA
     abcRatio : - BC/AB
     bcdRatio : - CD/BC
     xadRatio : - AD/XA
     err_min : - Minumum error threshold
     err_max : - Maximum error threshold
  Returns: True if the pattern is Anti NenStar. False otherwise.
 isAntiSharkPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiSharkPattern: Checks for harmonic pattern Anti Shark
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Anti Shark. False otherwise.
 isAntiCypherPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiCypherPattern: Checks for harmonic pattern Anti Cypher
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Anti Cypher. False otherwise.
 isAntiCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiCrabPattern: Checks for harmonic pattern Anti Crab
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Anti Crab. False otherwise.
 isAntiBatPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiBatPattern: Checks for harmonic pattern Anti Bat
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Anti Bat. False otherwise.
 isAntiGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isAntiGartleyPattern: Checks for harmonic pattern Anti Gartley
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Anti Gartley. False otherwise.
 isNavarro200Pattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max)  isNavarro200Pattern: Checks for harmonic pattern Navarro200
  Parameters:
     xabRatio : AB/XA
     abcRatio : BC/AB
     bcdRatio : CD/BC
     xadRatio : AD/XA
     err_min : Minumum error threshold
     err_max : Maximum error threshold
  Returns: True if the pattern is Navarro200. False otherwise.
 isHarmonicPattern(x, a, c, c, d, flags, errorPercent)  isHarmonicPattern: Checks for harmonic patterns
  Parameters:
     x : X coordinate value
     a : A coordinate value
     c : B coordinate value
     c : C coordinate value
     d : D coordinate value
     flags : flags to check patterns. Send empty array to enable all 
     errorPercent : Error threshold
  Returns:   Array of boolean values which says whether valid pattern exist and array of corresponding pattern names








