[EmreKb] Custom PatternCustom Pattern
With this indicator, you can create and display as many patterns as you want on the chart. The indicator works by taking two inputs. We can start the explanation by describing these inputs.
Inputs
Zigzag Length: Length for zigzag legs.
Patternscript Code: Patternscript code. (But what is patternscript?)
Explanation Of Patternscript
Patternscript (it's a completely fictional script language) is a scripting language that allows you to write your own patterns, and it operates within Pinescript). Let's take a look at the syntax of this language.
{
(, )
}
...
This means that the Fibonacci levels drawn from the from_point to the to_point must have the target_point between the min_fib_level and max_fib_level .
Let's see a few practical examples.
Patternscript Code For ABCD Pattern
ABCD{
ABC(0.618, 0.886)
BCD(1.272, 1.618)
}
ABC(0.618, 0.886): Fibonacci drawn from the A to B, must have the C between the 0.618 and 0.886
BCD(1.272, 1.618): Fibonacci drawn from the B to C, must have the D between the 1.272 and 1.618
Patternscript Code For Multiple Pattern
BAT{
XAB(0.382, 0.5)
ABC(0.382, 0.886)
BCD(1.618, 2.618)
XAD(0.382, 0.886)
}
ABCD{
ABC(0.618, 0.886)
BCD(1.272, 1.618)
}
Notes:
You can set the pattern name as you like, this is not related to the pattern rules.
There is no limit for pattern count, but remember pine limits.
Xabcd
Butterfly Harmonic Pattern [TradingFinder] Harmonic Detector🔵 Introduction
The Butterfly Harmonic Pattern is a sophisticated and highly regarded tool in technical analysis, utilized by traders to identify potential reversal points in the financial markets. This pattern is distinguished by its reliance on Fibonacci ratios and geometric configurations, which aid in predicting price movements with remarkable precision.
The origin of the Butterfly Harmonic Pattern can be traced back to the pioneering work of Bryce Gilmore, who is credited with discovering this pattern. Gilmore's extensive research and expertise in Fibonacci ratios laid the groundwork for the identification and application of this pattern in technical analysis.
The Butterfly pattern, like other harmonic patterns, is based on the principle that market movements are not random but follow specific structures and ratios.
The pattern is characterized by a distinct "M" shape in bullish scenarios and a "W" shape in bearish scenarios, each indicating a potential reversal point. These formations are identified by specific Fibonacci retracement and extension levels, making the Butterfly pattern a powerful tool for traders seeking to capitalize on market turning points.
The precise nature of the Butterfly pattern allows for the accurate prediction of target prices and the establishment of strategic entry and exit points, making it an indispensable component of a trader's analytical arsenal.
Bullish :
Bearish :
🔵 How to Use
Like other harmonic patterns, the Butterfly pattern is categorized based on how it forms at the end of an uptrend or downtrend. Unlike the Gartley and Bat patterns, the Butterfly pattern, similar to the Crab pattern, forms outside the wave 3 range at the end of a rally.
🟣 Types of Butterfly Harmonic Patterns
🟣 Bullish Butterfly Pattern
This pattern forms at the end of a downtrend and leads to a trend reversal from a downtrend to an uptrend.
🟣 Bearish Butterfly Pattern
In contrast to the Bullish Butterfly pattern, this pattern forms at the end of an uptrend and warns analysts of a trend reversal to a downtrend. In this case, traders are encouraged to shift their trading stance from buy trades to sell trades.
Advantages and Limitations of the Butterfly Pattern in Technical Analysis :
The Butterfly pattern is considered one of the precise and stable tools in financial market analysis. However, it is always important to pay special attention to the advantages and limitations of each pattern.
Here, we review the advantages and disadvantages of using the Butterfly harmonic pattern :
The main advantage of the Butterfly pattern is providing very accurate signals.
Using Fibonacci golden ratios and geometric rules, the Butterfly pattern identifies patterns accurately and systematically. (This high accuracy significantly helps investors in making trading decisions.)
Identifying this pattern requires expertise and experience in technical analysis.
Recognizing the Butterfly pattern might be complex for beginner traders. (Correct identification of the pattern necessitates mastery over geometric principles and Fibonacci ratios.)
The Butterfly harmonic pattern might issue false trading signals. (Traders usually combine the Butterfly pattern with other technical tools to confirm buy and sell signals.)
🔵 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 Forma t: 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.
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.
Crab Harmonic Pattern [TradingFinder] Harmonic Chart patterns🔵 Introduction
The Crab pattern is recognized as a reversal pattern in technical analysis, utilizing Fibonacci numbers and percentages for chart analysis. This pattern can predict suitable price reversal areas on charts using Fibonacci ratios.
The structure of the Crab pattern can manifest in both bullish and bearish forms on the chart. By analyzing this structure, traders can identify points where the price direction changes, which are essential for making informed trading decisions.
The pattern's structure is visually represented on charts as shown below. To gain a deeper understanding of the Crab pattern's functionality, it is beneficial to become familiar with its various harmonic forms.
🟣 Types of Crab Patterns
The Crab pattern is categorized into two types based on its structure: bullish and bearish. The bullish Crab is denoted by the letter M, while the bearish Crab is indicated by the letter W in technical analysis.
Typically, a bullish Crab pattern signals a potential price increase, whereas a bearish Crab pattern suggests a potential price decrease on the chart.
The direction of price movement depends significantly on the price's position within the chart. By identifying whether the pattern is bullish or bearish, traders can determine the likely direction of the price reversal.
Bullish Crab :
Bearish Crab :
🔵 How to Use
When trading using the Crab pattern, crucial parameters include the end time of the correction and the point at which the chart reaches its peak. Generally, the best time to buy is when the chart nears the end of its correction, and the best time to sell is when it approaches the peak price.
As we discussed, the end of the price correction and the time to reach the peak are measured using Fibonacci ratios. By analyzing these levels, traders can estimate the end of the correction in the chart waves and select a buying position for their stock or asset upon reaching that ratio.
🟣 Bullish Crab Pattern
In this pattern, the stock price is expected to rise at the pattern's completion, transitioning into an upward trend. The bullish Crab pattern usually begins with an upward trend, followed by a price correction, after which the stock resumes its upward movement.
If a deeper correction occurs, the price will change direction at some point on the chart and rise again towards its target price. Price corrections play a critical role in this pattern, as it aims to identify entry and exit points using Fibonacci ratios, allowing traders to make purchases at the end of the corrections.
When the price movement lines are connected on the chart, the bullish Crab pattern resembles the letter M.
🟣 Bearish Crab Pattern
In this pattern, the stock price is expected to decline at the pattern's completion, leading to a strong downward trend. The bearish Crab pattern typically starts with a price correction in a downward trend and, after several fluctuations, reaches a peak where the direction changes downward, resulting in a significant price drop.
This pattern uses Fibonacci ratios to identify points where the price movement is likely to change direction, enabling traders to exit their positions at the chart's peak. When the price movement lines are connected on the chart, the bearish Crab pattern resembles the letter W.
🔵 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 Pattern Table Inputs█ OVERVIEW
This indicator was intended as educational purpose only based on Harmonic Pattern Table (Source Code) .
Some user have different ratios in mind, thus I add input to allow user to change those ratios.
█ CREDITS
Scott M Carney, Trading Volume 3: Reaction vs. Reversal
█ CREDITS
1. List Harmonic Patterns.
2. Font size small for mobile app and font size normal for desktop.
3. Font color does automatically change follow dark / light chart theme.
4. Inputs to change ratio values.
█ USAGE / EXAMPLES
lib_retracement_patternsLibrary "lib_retracement_patterns"
types and functions for XABCD pattern detection and plotting
method set_tolerances(this, tolerance_Bmin, tolerance_Bmax, tolerance_Cmin, tolerance_Cmax, tolerance_Dmin, tolerance_Dmax)
sets tolerances for B, C and D retracements. This creates another Pattern instance that is set as tolerances field on the original and will be used for detection instead of the original ratios.
Namespace types: Pattern
create_config(pattern_line_args, pattern_point_args, name_label_args, retracement_line_args, retracement_label_args, line_args_Dtarget, line_args_completion, line_args_tp1, line_args_tp2, line_args_sl, label_args_completion, label_args_tp1, label_args_tp2, label_args_sl, label_terminal, label_terminal_up_char, label_terminal_down_char, color_bull, color_bear, color_muted, fill_opacity, draw_point_labels, draw_retracements, draw_target_range, draw_levels, hide_shorter_if_shared_legs_greater_than_max, hide_engulfed_pattern, hide_engulfed_pattern_of_same_type, hide_longer_pattern_with_same_X, mute_previous_pattern_when_next_overlaps, keep_failed_patterns)
method direction(this)
Namespace types: Match
method length(this)
return the length of this pattern, determined by the distance between X and D point
Namespace types: Match
method height(this)
return the height of this pattern, determined by the distance between the biggest distance between A/C and X/D
Namespace types: Match
method is_forming(this)
returns true if not complete, not expired and not invalidated
Namespace types: Match
method tostring(this)
return a string representation of all Matches in this map
Namespace types: Match
method tostring(this)
Namespace types: map
remove_complete_and_expired(this)
method add(this, item)
Namespace types: map
method is_engulfed_by(this, other)
checks if this Match is engulfed by the other
Namespace types: Match
method update(tracking_matches, zigzag, patterns, max_age_idx, detect_dir, pattern_minlen, pattern_maxlen, max_sub_waves, max_shared_legs, max_XB_BD_ratio, debug_log)
checks this map of tracking Matches if any of them was completed or invalidated in
Namespace types: map
method mute(this, mute_color, mute_fill_color)
mute this pattern by making it all one color (lines and labels, for pattern fill there's another)
Namespace types: Match
method mute(this, mute_color, mute_fill_color)
mute all patterns in this map by making it all one color (lines and labels, for pattern fill there's another)
Namespace types: map
method hide(this)
hide this pattern by muting it with a transparent color
Namespace types: Match
method reset_styles(this)
reset the style of a muted or hidden match back to the preset configuration
Namespace types: Match
method delete(this)
remove the plot of this Match from the chart
Namespace types: Match
method delete(this)
remove all the plots of the Matches in this map from the chart
Namespace types: map
method draw(this)
draw this Match on the chart
Namespace types: Match
method draw(this, config, all_patterns, debug_log)
draw all Matches in this map, considering all other patterns for engulfing and overlapping
Namespace types: map
method check_hide_or_mute(this, all, config, debug_log)
checks if this pattern needs to be hidden or muted based on other plotted patterns and given configuration
Namespace types: Match
method add_if(id, item, condition)
convenience function to add a search pattern to a list, only if given condition (input.bool) is true
Namespace types: Pattern
Pattern
type to hold retracement ratios and tolerances for this pattern, as well as targets for trades
Config
allows control of pattern plotting shape and colors, as well as settings for hiding overlapped patterns etc.
Match
holds all information on a Pattern and a successful match in the chart. Includes XABCD pivot points as well as all Line and Label objects to draw it
Tailored-Custom Hamonic Patterns█ OVERVIEW
We have included by default 3 known Patterns. The Bat, the Butterfly and the Gartley. But have you ever wondered how effective other,
not yet known models could be? Don't ask yourself the question anymore, it's time to find out for yourself! You have the option to customize
your own Patterns with the Backtesting tool and set Retracement Ratios and Targets for your own Patterns. In addition to this, in order to determine
the Trend at a glance and make Pattern detection more efficient, we have linked the calculation of Patterns to Bands of several types to choose
from (Bollinger, Keltner, Donchian) that you can select from a drop-down menu in the settings and play with the Multiplier
and the Adaptive Length of the Patterns to see how it affects the success rate in the Backtesting table.
█ HOW DOES IT WORK?
- Harmonic Patterns
-Pattern Names, Colors, Style etc… Everything is customizable.
-Dynamic Adaptative Length with Min/Max Length.
- XAB/ABC Ratio
-Min/Max XAB/ABC Configurable Ratio for each Pattern to create your own Patterns.
(This is really the particular option of this Indicator, because it allows you to be able to Backtest in real time
after having played at configuring your own Ratios)
- Bands
-Contrary to the original logic of the HeWhoMustNotBeNamed script, here when the price breaks out of the upper Bands
(example, Bollinger band, Keltner Channel or Donchian Channel) , with a predetermined Minimum and Maximum Length and Multiplier, we can consider
the Trend to be Bearish (and not Bullish) and similarly when the price breaks down in the lower band, we can consider the Trend
to be Bullish (not Bearish) . We have also added the middle line of the Channels (which can be useful for 'Scalper' type Traders.
-The Length of the Bands Filter is directly related to the Dynamic Length of the Patterns.
-You can use a drop-down menu to select from the following Bands Filters :
SMA, EMA, HMA, RMA, WMA, VWMA, HIGH/LOW, LINREG, MEDIAN.
-Sticky and Adaptive Bands options has been included.
- Projections
-BD/CD Projection Ratio configurable for each Pattern.
(Projections are visible as Dotted Lines which we can choose to Extend or not)
- Targets
-Target, PRZ and Stop Levels are set to optimal values based on individual Patterns. (The PRZ Level corresponds to point D
of the detected Pattern so its value should always be 0) but you can change the Targets value (defined in %) as you wish.
Again here, you have the option to fully configure the Style and Extend the Lines or not.
- Backtesting Table
-As said previously, with the possibility of testing the Success Rate of each of the 3 Customizable Patterns,
this option is part of the logic of this Indicator.
- Alerts
-We originally believe that this Indicator does not even need Alerts. But we still decided to include at least one Alert
that you can set for when a new Pattern is detected.
█ NOTES
Thanks to HeWhoMustNotBeNamed for his permission to reuse some part of his zigzag scripts.
Remember to only make a decision once you are sure of your analysis. Good trading sessions to everyone and don't forget,
risk management remains the most important!
TALibrary "TA"
General technical analysis functions
div_bull(pS, iS, cp_length_after, cp_length_before, pivot_length, lookback, no_broken, pW, iW, hidW, regW)
Test for bullish divergence
Parameters:
pS : Price series (float)
iS : Indicator series (float)
cp_length_after : Bars after current (divergent) pivot low to be considered a valid pivot (optional int)
cp_length_before : Bars before current (divergent) pivot low to be considered a valid pivot (optional int)
pivot_length : Bars before and after prior pivot low to be considered valid pivot (optional int)
lookback : Bars back to search for prior pivot low (optional int)
no_broken : Flag to only consider divergence valid if the pivot-to-pivot trendline is unbroken (optional bool)
pW : Weight of change in price, used in degree of divergence calculation (optional float)
iW : Weight of change in indicator, used in degree of divergence calculation (optional float)
hidW : Weight of hidden divergence, used in degree of divergence calculation (optional float)
regW : Weight of regular divergence, used in degree of divergence calculation (optional float)
Returns:
flag = true if divergence exists (bool)
degree = degree (strength) of divergence (float)
type = 1 = regular, 2 = hidden (int)
lx1 = x coordinate 1 (int)
ly1 = y coordinate 1 (float)
lx2 = x coordinate 2 (int)
ly2 = y coordinate 2 (float)
div_bear(pS, iS, cp_length_after, cp_length_before, pivot_length, lookback, no_broken, pW, iW, hidW, regW)
Test for bearish divergence
Parameters:
pS : Price series (float)
iS : Indicator series (float)
cp_length_after : Bars after current (divergent) pivot high to be considered a valid pivot (optional int)
cp_length_before : Bars before current (divergent) pivot highto be considered a valid pivot (optional int)
pivot_length : Bars before and after prior pivot high to be considered valid pivot (optional int)
lookback : Bars back to search for prior pivot high (optional int)
no_broken : Flag to only consider divergence valid if the pivot-to-pivot trendline is unbroken (optional bool)
pW : Weight of change in price, used in degree of divergence calculation (optional float)
iW : Weight of change in indicator, used in degree of divergence calculation (optional float)
hidW : Weight of hidden divergence, used in degree of divergence calculation (optional float)
regW : Weight of regular divergence, used in degree of divergence calculation (optional float)
Returns:
flag = true if divergence exists (bool)
degree = degree (strength) of divergence (float)
type = 1 = regular, 2 = hidden (int)
lx1 = x coordinate 1 (int)
ly1 = y coordinate 1 (float)
lx2 = x coordinate 2 (int)
ly2 = y coordinate 2 (float)
XABCD Harmonic Pattern Custom Range Interactive█ OVERVIEW
This indicator was designed based on Harmonic Pattern Book written by Scott Carney. It was simplified to user who may always used tools such as XABCD Pattern and Long Position / Short Position, which consume a lot of time, recommended for both beginner and expert of Harmonic Pattern Traders. XABCD Pattern require tool usage of Magnet tool either Strong Magnet, Week Magnet or none, which cause error or human mistake especially daily practice.
Simplified Guideline by sequence for Harmonic Pattern if using manual tools :
Step 1 : Trade Identification - XABCD Pattern
Step 2 : Trade Execution - Any manual tools of your choice
Step 3 : Trade Management - Position / Short Position
█ INSPIRATION
Inspired by design, code and usage of CAGR. Basic usage of custom range / interactive, pretty much explained here . Credits to TradingView.
I use a lot of XABCD Pattern and Long Position / Short Position, require 5 to 10 minutes on average, upon determine the validity of harmonic pattern.
Upon creating this indicator, I believed that time can be reduced, gain more confidence, reduce error during drawing XABCD, which helps most of harmonic pattern users.
█ FEATURES
Table can positioned by any postion and font size can be resized.
Table can be display through optimized display or manual control.
Validility of harmonic pattern depends on BC ratio.
Harmonic pattern can be displayed fully or optimized while showing BC ratio validity.
Trade Execution at point D can be displayed on / off.
Stop Loss and Take Profit can be calculated automatically or manually.
Optimized table display based extend line setup and profit and loss setup.
Execution zone can be offset to Point C, by default using Point D.
Currency can be show or hide.
Profit and Loss can be displayed on axis once line is extended.
█ HOW TO USE
Step 1 : Trade Identification - Draw points from Point X to Point C. Dont worry about magnet, point will attached depends on High or Low of the candle.
Step 2 : Trade Execution - Check the validity of BC to determine the validity of harmonic pattern generated. Pattern only generate 1 pattern upon success. Otherwise, redraw to other points.
Step 3 : Trade Management - Determine the current candle either reach Point D or Potential Reversal Zone (PRZ). Check for Profit & Loss once reach PRZ.
█ USAGE LIMITATIONS
Harmonic Patterns only limits to patterns mentioned in Harmonic Trading Volume 3 due to other pattern may have other or different philosophy.
Only can be used for Daily timeframe and below due to bar_time is based on minutes by default.
Not recommended for Weekly and Monthly timeframe.
If Point X, A, B, C and D is next to each other, it is recommend to use lower timeframe.
Automated alert is not supported for this release. However, alert can be done manually. Alert will updated on the version.
█ PINE SCRIPT LIMITATIONS
Known bug for when calculate time in array, causing label may not appeared or offset.
Unable to convert to library due to usage of array.get(). I prefer usage for a combination of array.get(id, 0), array.get(id, 1), array.get(id, 2) into custom function, however I faced this issue during make arrays of label. Index can be simply refered as int, for id, i not sure, already try id refered as simple, nothing happens.
linefill.new() will appeared as diamond box if overused.
Text in box.new() unable to use ternary condition or switch to change color. Bgcolor also affected.
Label display is larger than XABCD tool. Hopefully in future, have function to resize label similar to XABCD tools.
█ IMPORTANTS
Trade Management (Profit & Loss) is calculated from Point A to D.
Take Profit is calculated based on ratio 0.382 and 0.618 of Point A to D.
Always check BC validity before proceed to Trade Management.
Length of XABCD is equal to XAB plus BCD, where XAB and BCD are one to one ratio. Length is measured in time.
Use other oscillator to countercheck. Normally use built-in Relative Strength Index (RSI) and Divergence Indicator to determine starting point of Point X and A.
█ HARMONIC PATTERNS SUPPORTED
// Credits to Scott M Carney, author of Harmonic Trading Volume 3: Reaction vs. Reversal
Alt Bat - Page 101
Bat - Page 98
Crab - Page 104
Gartley - Page 92
Butterfly - Page 113
Deep Crab - Page 107
Shark - Page 119 - 220
█ FAQ
Pattern such as 5-0, perfect XABCD and ABCD that not included, will updated on either next version or new release.
Point D time is for approximation only, not including holidays and extended session.
Basic explaination for Harmonic Trading System (Trade Identification, Trade Execution and Trade Management).
Harmonic Patterns values is pretty much summarized here including Stop Loss.
Basic explanation for Alt Bat, Bat, Crab, Gartley, Deep Crab and Butterfly.
█ USAGE / TIPS EXAMPLES (Description explained in each image)
Harmonic Trading System Educational (Source Code)This indicator was intended as educational purpose only for Harmonic Patterns using XABCD Pattern Tool.
This indicator was build upon Harmonic Trading : Volume One and Harmonic Trading : Volume Three, written by Scott M Carney.
Harmonic Trading System consist of 3 important elements such as Trade Identification, Trade Execution and Trade Management, each of these element description can be hover at each label.
Harmonic Trading System
1. Trade Identification
This technique use historically proven and repetitive price patterns that focus on overbought and oversold signals generated by price action.
Understanding parameters is critical to define specific opportunities based on individual harmonic pattern including ratio is important.
2. Trade Execution
During harmonic pattern is complete, must focus actual trade within specific time period.
3. Trade Management
Specific Initial Price Objective (IPO) based on risk and opportunity.
Indikator ini bertujuan sebagai pendidikan sahaja untuk Harmonic Pattern menggunakan XABCD Pattern Tool.
Indikator ini dibina berdasarkan buku Harmonic Trading : Volume One dan Harmonic Trading : Volume Three, ditulis oleh Scott M Carney.
Harmonic Trading System mengandungi 3 element penting seperti Trade Identification, Trade Execution dan Trade Management, penerangan setiap elemen boleh didapati dengan meletak mouse pada label.
Harmonic Trading System
1. Trade Identification
Teknik ini menggunakan price patterns yang berulang dan sejarahnya terbukti yang fokus pada signal overbought dan oversold terhasil daripada price action.
Memahami parameter adalah penting untuk mengenalpasti peluang secara spesifik berdasarkan harmonic patern yang tertentu termasuk ratio adalah penting.
2. Trade Execution
Semasa harmonic pattern adalah lengkap, mestilah focus pada trade yang sebenar dalam jangka masa yang spesifik.
3. Trade Management
Initial Price Objective (IPO) secara spesifik berdasarkan risiko dan peluang.
Indicator features :
1. List XAB=CD patterns including ratio and reference page.
2. For desktop display only, not for mobile.
3. Hover to label to display tooltip (example Trade identification).
Kemampuan indikator :
1. Senarai XAB=CD pattern termasuk ratio and rujukan muka surat.
2. Untuk paparan desktop sahaja, bukan untuk mobile.
3. Letak mouse pada labell untuk memaparkan tooltip (example Trade identification).
FAQ
1. Credits / Kredit
Scott M Carney, Harmonic Trading : Volume One
Scott M Carney, Harmonic Trading : Volume Three
2. Pattern and Chapter involved / Pattern dan Bab terlibat
Bullish Harmonic Trade Management Model - Harmonic Trading: Volume One - Page 209
Bearish Harmonic Trade Management Model - Harmonic Trading: Volume One - Page 220
The Harmonic Trading Process - Harmonic Trading: Volume Three - Page 42 to 44
Bullish Phases of Trading - Harmonic Trading: Volume Three - Page 48
Bearish Phases of Trading - Harmonic Trading: Volume Three - Page 50
3. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
Bullish Harmonic Trading System
Bearish Harmonic Trading System
Harmonic Pattern Educational Volume 2 (Source Code)This indicator was intended as educational purpose only for Harmonic Patterns using XABCD Pattern Tool.
This indicator was build upon Harmonic Trading : Volume Two, which was continuation from Harmonic Trading : Volume One and The Harmonic Trader, written by Scott M Carney.
Explaination was similar to previous build, build 0 and build 1 .
Volume 2 introduce Harmonic Ratio Progression, which result new patterns such as 5-0 and Alternate Bat.
Indikator ini bertujuan sebagai pendidikan sahaja untuk Harmonic Pattern menggunakan XABCD Pattern Tool.
Indikator ini dibina berdasarkan buku Harmonic Trading : Volume Two, juga sambungan daripada Harmonic Trading : Volume One and The Harmonic Trader, ditulis oleh Scott M Carney.
Penerangan yang sama berdasarkan binaan lepas, build 0 and build 1 .
Volume 2 memperkenalkan Harmonic Ratio Progression, membolehkan pattern baru seperti 5-0 dan Alternate Bat.
Indicator features :
1. List XAB=CD patterns including ratio and reference page.
2. For desktop display only, not for mobile.
Kemampuan indikator :
1. Senarai XAB=CD pattern termasuk ratio and rujukan muka surat.
2. Untuk paparan desktop sahaja, bukan untuk mobile.
FAQ
1. Credits / Kredit
Scott M Carney, Harmonic Trading : Volume One
2. Pattern and Chapter involved / Pattern dan Bab terlibat
Bullish 5-0 - Page 79
Bearish 5-0 - Page 88
Bullish Alternate Bat - Page 103
Bearish Alternate Bat - Page 106
3. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
5-0
Alternate Bat
Harmonic Pattern Educational Volume 1 (Source Code)This indicator was intended as educational purpose only for Harmonic Patterns using XABCD Pattern Tool.
This indicator was build upon Harmonic Trading : Volume One, which was continuation from The Harmonic Trader, written by Scott M Carney.
From the previous build , only Gartley and Butterfly were explained ideally based on The Harmonic Trader.
For this buid, Gartley and Butterfly were further refined and additional patterns such as Bat, Crab and Deep Crab were born based on Harmonic Trading : Volume One.
Explaination was similar to previous build . In addition, Perfect Patterns are added except for Deep Crab.
Indikator ini bertujuan sebagai pendidikan sahaja untuk Harmonic Pattern menggunakan XABCD Pattern Tool.
Indikator ini dibina berdasarkan buku Harmonic Trading : Volume One, juga sambungan daripada The Harmonic Trader, ditulis oleh Scott M Carney.
Berdasarkan binaan lepas , cuma Gartley dan Butterfly diterangkan secara ideal berdasarkan The Harmonic Trader.
Untuk binaan ini, Gartley dan Butterfly telah dihalusi dan pattern tambahan seperti Bat, Crab and Deep Crab telah lahir berdasarkan Harmonic Trading : Volume One.
Penerangan yang sama berdasarkan binaan lepas . Tambahan, Perfect Pattern telah ditambah kecuali untuk Deep Crab.
Indicator features :
1. List XAB=CD patterns including ratio and reference page.
2. For desktop display only, not for mobile.
Kemampuan indikator :
1. Senarai XAB=CD pattern termasuk ratio and rujukan muka surat.
2. Untuk paparan desktop sahaja, bukan untuk mobile.
FAQ
1. Credits / Kredit
Scott M Carney, Harmonic Trading : Volume One
2. Pattern and Chapter involved / Pattern dan Bab terlibat
Bullish Ideal Bat - Page 72
Bearish Ideal Bat - Page 83
Bullish Perfect Bat - Page 91
Bearish Perfect Bat - Page 94
Bullish Ideal Gartley - Page 99
Bearish Ideal Gartley - Page 106
Bullish Perfect Gartley - Page 115
Bearish Perfect Gartley - Page 118
Bullish Ideal Crab - Page 123
Bearish Ideal Crab - Page 130
Bullish Perfect Crab - Page 143
Bearish Perfect Crab - Page 146
Bullish Ideal Deep Crab - Page 137
Bearish Ideal Deep Crab - Page 140
Bullish Ideal Butterfly - Page 150
Bearish Ideal Butterfly - Page 158
Bullish Perfect Butterfly - Page 163
Bearish Perfect Butterfly - Page 166
3. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
Ideal / Perfect Bat
Ideal / Perfect Gartley
Ideal / Perfect Crab
Ideal Deep Crab
Ideal / Perfect Butterfly
Harmonic Pattern Educational Volume 0 (Source Code)This indicator was intended as educational purpose only for Harmonic Patterns using XABCD Pattern Tool.
Gartley and Butterfly patterns were ideal patterns explained from The Harmonic Trader written by Scott M Carney.
Some values are further updated later in Harmonic Trading: Volume Three, also by Scott M Carney.
The Harmonic Trader book was also known as Harmonic Trading: Volume Zero.
Usually Bullish Patterns show as "M" shape while Bearish Patterns show as "W" shape.
";" indicates range, example : 1.27;1.618 meaning that value between 1.27 to 1.618.
Indikator ini bertujuan sebagai pendidikan sahaja untuk Harmonic Pattern menggunakan XABCD Pattern Tool.
Pattern Gartley dan Butterfly, juga sebagai pattern ideal telah diterangkan dari buku The Harmonic Trader ditulis oleh Scott M Carney.
Beberapa nilai kemudiannya telah dikemaskini dalam Harmonic Trading: Volume Three, juga oleh Scott M Carney.
Buku The Harmonic Trader book juga dikenali sebagai Harmonic Trading: Volume Zero.
Kebiasaanya Bullish Pattern tunjuk sebagai bentuk "M" manakala Bearish Pattern tunjuk sebagai bentuk "W".
";" menunjukkan range, contoh : 1.27;1.618 bermaksud nilai 1.27 hingga 1.618.
Indicator features :
1. List XAB=CD patterns including ratio and reference page.
2. For desktop display only, not for mobile.
Kemampuan indikator :
1. Senarai XAB=CD pattern termasuk ratio and rujukan muka surat.
2. Untuk paparan desktop sahaja, bukan untuk mobile.
FAQ
1. Credits / Kredit
Scott M Carney, The Harmonic Trader
2. Pattern and Chapter involved / Pattern dan Bab terlibat
Bullish Ideal Gartley - Page 160
Bearish Ideal Gartley - Page 171
Bullish Ideal Butterfly - Page 194
Bearish Ideal Butterfly - Page 204
3. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
Bullish (M) / Bearish (W) Ideal Gartley
Bullish (M) / Bearish (W) Ideal Butterfly
Bat Action Magnet Move BAMM Theory Educational (Source Code)This indicator was intended as educational purpose only for BAMM, which also known as Bat Action Magnet Move.
Indikator ini bertujuan sebagai pendidikan sahaja untuk BAMM, juga dikenali sebagai Bat Action Magnet Move.
BAMM is usually used for Harmonic Patterns such as XAB=CD (Bat Pattern) and AB=CD (0.5 AB=CD Pattern) - Chapter 5.
BAMM also can be used for other Harmonic Pattern with the help of RSI Divergence, hence become RSI BAMM - Chapter 6.
BAMM kebiasaanya digunakan untuk Harmonic Pattern seperti XAB=CD (Bat Pattern) dan AB=CD (0.5 AB=CD Pattern) - Chapter 5.
BAMM juga boleh digunakan untuk Harmonic Pattern lain dengan bantuan RSI Divergence, menjadi RSI BAMM - Chapter 6.
FAQ
1. Credits / Kredit
Scott M Carney,
Scott M Carney, Harmonic Trading: Volume Two (Chapter 5 & Chapter 6)
Bullish XAB=CD BAMM Breakout - Page 144
Bearish XAB=CD BAMM Breakdown - Page 148
Bullish AB=CD BAMM Breakout - Page 153
Bearish AB=CD BAMM Breakdown - Page 156
2. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
2.0 AB=CD Pattern
XAB=CD Bat Pattern
Harmonic Trading Ratios Educational (Source Code)This table indicator was intended as educational purpose only for Harmonic Trading Ratios.
The ratios are used for Harmonic AB=CD and XAB=CD.
Ratio calculation are shown for Retracement and Projection based Primary, Primary Derived, Secondary Derived and Secondary Derived Extreme.
Primary Retracement : 0.618
Primary Projection : 1.618
Please take note that Secondary Derived Extreme is only available for Projection.
Indikator berjadual bertujuan sebagai pendidikan sahaja untuk Harmonic Trading Ratios.
Ratio digunakan untuk Harmonic AB=CD and XAB=CD.
Pengiraan ratio untuk Retracement and Projection adalah berdasarkan Primary, Primary Derived, Secondary Derived dan Secondary Derived Extreme.
Primary Retracement : 0.618
Primary Projection : 1.618
Sila ambil perhatian bahawa Secondary Derived Extreme adalah untuk Projection sahaja.
The values shown in table was based on Harmonic Trading: Volume One, Page 18 written by Scott M Carney.
Nilai yang ditunjukkan dalam jadual adalah berdasarkan buku Harmonic Trading: Volume One, Page 18 ditulis oleh Scott M Carney.
Indicator features :
1. List Harmonic Trading Ratios including calculation.
2. Show and draw individual Harmonic Trading Ratio.
3. For desktop display only, not for mobile.
Kemampuan indikator :
1. Senarai Harmonic Trading Ratios termasuk pengiraan.
2. Memapar dan melukis Harmonic Trading Ratio secara berasingan.
3. Untuk paparan desktop sahaja, bukan untuk mobile.
FAQ
1. Credits / Kredit
Scott M Carney,
Scott M Carney, Harmonic Trading: Volume One
2. Code Usage / Penggunaan Kod
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney.
Display for Bullish / Bearish Retracement
Paparan untuk Bullish / Bearish Retracement
Display for Primary Retracement and Primary Projection
Paparan untuk Primary Retracement and Primary Projection
Display for Secondary Derived Extreme Retracement and Secondary Derived Extreme Projection
Paparan untuk Secondary Derived Extreme Retracement and Secondary Derived Extreme Projection
Harmonic IndicatorThis indicator finds all of the gartley and cypher patterns on anychart and personally I have been using them profitably with BTC, ETH, and LTC. It includes entry points for both patterns but not TP levels, that is up to you to do research on. In version 2 I am working on this, if any of you can help me with that, it would be appreciated. Goodluck!