Large Shadow Detector V.1Large Shadow Detector for TradingView
This Pine Script indicator highlights candles with shadows (wicks) exceeding a customizable threshold in points on the XAU/USD chart, specifically for the 1-hour timeframe.
Key Features:
Customizable Shadow Threshold: An input field allows users to set the threshold for detecting large shadows. The default is set to 3400 points.
Upper and Lower Shadows Calculation: The script calculates the upper and lower shadows of each candle.
Condition Checks: It checks if the shadows exceed the defined threshold.
Visual Indicators: Red triangles are plotted above candles with large upper shadows, and green triangles are plotted below candles with large lower shadows.
Patterns Harmoniques
All Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically draws and sends alerts for all of the harmonic patterns in my public library as they occur. The patterns included are as follows:
• Bearish 5-0
• Bullish 5-0
• Bearish ABCD
• Bullish ABCD
• Bearish Alternate Bat
• Bullish Alternate Bat
• Bearish Bat
• Bullish Bat
• Bearish Butterfly
• Bullish Butterfly
• Bearish Cassiopeia A
• Bullish Cassiopeia A
• Bearish Cassiopeia B
• Bullish Cassiopeia B
• Bearish Cassiopeia C
• Bullish Cassiopeia C
• Bearish Crab
• Bullish Crab
• Bearish Deep Crab
• Bullish Deep Crab
• Bearish Cypher
• Bullish Cypher
• Bearish Gartley
• Bullish Gartley
• Bearish Shark
• Bullish Shark
• Bearish Three-Drive
• Bullish Three-Drive
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Measurement Tolerances
Tolerance refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. I have applied this concept in my pattern detection logic and have set default tolerances where applicable, as perfect patterns are, needless to say, very rare.
Chart Patterns
Generally speaking price charts are nothing more than a series of swing highs and swing lows. When demand outweighs supply over a period of time prices swing higher and when supply outweighs demand over a period of time prices swing lower. These swing highs and swing lows can form patterns that offer insight into the prevailing supply and demand dynamics at play at the relevant moment in time.
‘Let us assume… that you the reader, are not a member of that mysterious inner circle known to the boardrooms as “the insiders”… But it is fairly certain that there are not nearly so many “insiders” as amateur trader supposes and… It is even more certain that insiders can be wrong… Any success they have, however, can be accomplished only by buying and selling… hey can do neither without altering the delicate poise of supply and demand that governs prices. Whatever they do is sooner or later reflected on the charts where you… can detect it. Or detect, at least, the way in which the supply-demand equation is being affected… So, you do not need to be an insider to ride with them frequently… prices move in trends. Some of those trends are straight, some are curved; some are brief and some are long and continued… produced in a series of action and reaction waves of great uniformity. Sooner or later, these trends change direction; they may reverse (as from up to down), or they may be interrupted by some sort of sideways movement and then, after a time, proceed again in their former direction… when a price trend is in the process of reversal… a characteristic area or pattern takes shape on the chart, which becomes recognisable as a reversal formation… Needless to say, the first and most important task of the technical chart analyst is to learn to know the important reversal formations and to judge what they may signify in terms of trading opportunities’ (Edwards & Magee, 1948).
This is as true today as it was when Edwards and Magee were writing in the first half of the last Century, study your patterns and make judgements for yourself about what their implications truly are on the markets and timeframes you are interested in trading.
Over the years, traders have come to discover a multitude of chart and candlestick patterns that are supposed to pertain information on future price movements. However, it is never so clear cut in practice and patterns that where once considered to be reversal patterns are now considered to be continuation patterns and vice versa. Bullish patterns can have bearish implications and bearish patterns can have bullish implications. As such, I would highly encourage you to do your own backtesting.
There is no denying that chart patterns exist, but their implications will vary from market to market and timeframe to timeframe. So it is down to you as an individual to study them and make decisions about how they may be used in a strategic sense.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements. The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
█ INPUTS
• Change pattern and label colours
• Show or hide patterns individually
• Adjust pattern tolerances
• Set or remove alerts for individual patterns
█ NOTES
You can test the patterns with your own strategies manually by applying the indicator to your chart while in bar replay mode and playing through the history. You could also automate this process with PineScript by using the conditions from my swing and pattern libraries as entry conditions in the strategy tester or your own custom made strategy screener.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ SOURCES
Edwards, R., & Magee, J. (1948) Technical Analysis of Stock Trends (10th edn). Reprint, Boca Raton, Florida: Taylor and Francis Group, CRC Press: 2013.
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 [WinWorld]PREFACE
This indicator was made with the help of our team's fellow friend and harmonic patterns expert, whose support we deeply appreciate — @Muneer_Gove
DESCRIPTION
Harmonic patterns are one the most recognizable and popular trading concepts in the word of trading.
They are distinct formations, found in the financial markets, that predict potential price movements based on Fibonacci ratios. These patterns, which include the Gartley, Bat, Alt Bat, Butterfly and etc., identify specific and repetitive price structures that can forecast future price reversals. By incorporating these patterns into trading process, one does gain an opportunity to profit from repetetitve price movements.
The whole thing about harmonic pattern is the process of finding them. The basic step-by-step guide to build a harmonic pattern is this:
Locate significant highs and lows on the chart, which form the basis of the pattern. The best tools to use for this purple is zigzag, because zigzag indicator draw lines, which will be helpful quite helpful in the process and will save you a lot of time;
Use Fibonacci tools to measure the retracement and extension levels between legs of pattern — distances between pair of points . Each harmonic pattern has specific Fibonacci ratios that define its structure;
Draw lines connecting the pivot points according to the pattern's structure. For example, a Gartley pattern connects five points (X, A, B, C, D) in a specific sequence and ratio;
Ensure that the identified structure adheres to the harmonic pattern’s Fibonacci requirements. If the points align within the acceptable ranges, the pattern is valid.
In order to better understand this process let's see an example of the pattern from our indicator right away:
This is a Butterfly pattern. Its set of retracememt ratios is as follows:
AB/XA = 0.756 to 0.816
BC/AB = 0.382 to 0.990
CD/BC = 1.618 to 2.618
AD/XA = 1.27
Below you can see that each ratio of the pattern is successfully met:
* Note : white lines — ratio range, yellow line — point 's price level in between ranges.
AB/XA Ratio
BC/AB Ratio
CD/BC Ratio
AD/XA Ratio
SETTINGS
Main Settings
Failed Patterns — shows/hides patterns, which meet one of these conditions:
— Price crossed level of point C before reaching PRZ;
— New pattern appeared and PRZ of previous pattern was not reached;
Completed Patterns — shosw/hides patterns, whose PRZ was reached;
Dashboard — shows/hides dashboard, which displays active patterns (patterns, which can be used to trade).
Alert Settings
PRZ — enables/disables alert of event, when price reaches PRZ.
ZigZag Settings
Depth #1-9 — shows/hides patterns of the chosen zigzag copy. Here you can choose customize depth number.
Pattern Visual Controls
Bullish Patterns — shows/hides bullish patterns;
Bearish Patterns — shows/hides bearish patterns;
Pending Patterns — shows/hides patterns, whose PRZ has not been reached yet;
list of pattern names — hides/shows chosen pattern.
Colours
Bullish — colour of bullish patterns;
Bearish — colour of bearish patterns.
IMPORTANT CONCEPTS
PRZ — entry target level.
If its text near the line level is purple, it means that PRZ has NOT been reached yet.
If it is white, it means that PRZ has been reached.
In order for SL or TP to be counted when price reaches, price has to reach PRZ first with its high/low.
SL — stop-loss.
If its near the line level is red, it means that SL has NOT been reached yet.
If it is white, it means that SL has been reached.
If it is gray, it means that SL has been invalidated — price crossed with high/low the level of point C before reaching PRZ.
If SL is reached and price reaches TP targets, they will be counted.
SL of each pattern are built by individual ratio. For example, in Butterfly pattern SL ratio is 1.414 and it is calculated as (SL - A)/XA.
IMPORTANT NOTE : SL is reached when price crosses SL level with candle's close (!)
TP — take-profit.
If its near the line level is green, it means that TP has NOT been reached yet.
If it is white, it means that TP has been reached.
If one of the TP targets is reached and price reached SL, it will not be counted.
IMPORTANT NOTE : TP is reached when price crosses TP level with candle's high/low(!)
TP of each pattern are built by same the ratios for all patterns, but it is calculated by individual algorithm. For example, in the same Butterfly pattern TP ratio will be 0.382, 0.500 and 0.618 and they will be placed as Fibonacci retracement grid from point A to point D ( same for formula for all other patterns, excluding the ones listed next ), BUT on Shark , Muner and AB=CD pattern the same TP will be placed as Fibonacci retracement grid from point C to point D
WHY USE THIS INDICATOR?
Our Harmic Patterns indicator uses zigzag, which is based on depth mechanic. In order to identify the maximum possible amount of patterns this indicator runs 9 copies of the same zigzags with different depth values. Each copy of zigzag can be turned off in the settings individually.
At the moment of publishing, this indicator can autmatically identify 10 patterns:
Crab
Deep Crab
Gartley
Deep Gartley
Bat
Alt Bat
Muner
Butterfly
Shark
AB=CD
Things, that make this indicator different from other harmonic pattern indicator, are:
Advanced pattern recognition and validation process. We have implemeted special logic, which allows the indicator to draw fully accurate patterns, which satisfy industry standards.
For example, let's say we have a bearish pattern. We take points X an A. If there is a price's high, that is above X point's high, such pattern should be automatically invalidated. We have found even one indicator that does perform such validation process, and our indicator does that. . And this is just one example, we have much of such mechanics implemeted thanks to Mr. Muner's knowledge.
Advanced pattern extension mechanics . Right this mechanic applies to only one pattern — Shark. Its classic CD/BC ratio is 0.886, but when price moves in a way so this ratio now equals to 1.13, this signal the indicator to redraw the pattern, based on this new CD/BC ratio. We haven't found any indicator on the market that has such mechanic implemented.
Dashboard for displaying active patterns . On this dashboard you can find patterns, whose SL and TP have not been touched yet. If price touches the SL or TP of the pattern, this pattern is removed from the dashboard, because it is considered finished.
At the moment of publishing this dashboard only shows the patterns from the current timeframe.
Informative alert when price reaches PRZ of the pattern . Many other indicator do not provide details of this event, which requires trader to waste his time on opening up the chart and searching for this event. Our indicator allows trader to see the PRZ price right when alert happens and open up the trade much fastr.
Alert message is made by this template:
, : PRZ was reached at on
Example:
BTCUSDT, long Bat: PRZ was reached at 70,000 on 15m.
ALERTS
At the moment of publishing this indicator offers one alert, which happens when price reaches PRZ level.
HOW CAN I GET THE MOST OUT OF THIS INDICATOR?
This indicator can act as the standalone tool, because PRZ, TP and SL are assigned to each pattern and tracked during the pattern's life period.
You can this indicator with any other strategy or indicator, because this indicator is basically a tool that shows the trader repetitive price formations, after which price tends to go a certaion direction in the most cases, allowing trader to profit from it.
You can try combining Harmonic Patterns indicator with Smart Money tools, made by our team, because Smart Money strategies basically show the most liquid price zones and levels, which can be used to find an entry opportunity and Harmonic Patterns indicator can be added to make a final decision on the entry.
If you are interested in trying these two strategies together, feel free to learn Smart Money trading strategy by reading our Advanced SMC guide, which is available in our eductional materials.
SUMMARY
Harmonic Patterns indicator is an advanced tool of technical analysis, which automatically finds 10 most used harmonic patterns on the chart, assign PRZ, TP and SL targets to them and tracks them during each pattern 'life period'.
While searching for these patterns, this indicator performs series of validation techniques, that allow trader to see only the most valid patterns, which have a higher changes to succeed.
This indicator can be used both as a standalone tool and as 'team player' for any stategy by being the tool, which can be used for making a final decision on an entry target.
AFTERWORD
This indicator has been developed for more than 2 weeks, which consisted of everyday discussions, bug fixes and special additons to the algorithm in order to making patterns more valid, so we really hope you will find a great use of this indicator and it will help you recude time on the analysis and boost your profits :)
We want to express our gratitude to @Muneer_Gove once again, because he has done huge job helping us fine-tuning the algorithm, building complex pattern validatiom and extension logic and fixing bugs. Thank you!
Best of luck , traders!
— with love, WinWorld Team
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.
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
Adaptive Trend Lines [MAMA and FAMA]Updated my previous algo on the Adaptive Trend lines, however I have added new functionalities and sorted out the settings.
You can now switch between normalized and non-normalized settings, the colors have also been updated and look much better.
The MAMA and FAMA
These indicators was originally developed by John F. Ehlers (Stocks & Commodities V. 19:10: MESA Adaptive Moving Averages). Everget wrote the initial functions for these in pine script. I have simply normalized the indicators and chosen to use the Laplace transformation instead of the hilbert transformation
How the Indicator Works:
The indicator employs a series of complex calculations, but we'll break it down into key steps to understand its functionality:
LaplaceTransform: Calculates the Laplace distribution for the given src input. The Laplace distribution is a continuous probability distribution, also known as the double exponential distribution. I use this because of the assymetrical return profile
MESA Period: The indicator calculates a MESA period, which represents the dominant cycle length in the price data. This period is continuously adjusted to adapt to market changes.
InPhase and Quadrature Components: The InPhase and Quadrature components are derived from the Hilbert Transform output. These components represent different aspects of the price's cyclical behavior.
Homodyne Discriminator: The Homodyne Discriminator is a phase-sensitive technique used to determine the phase and amplitude of a signal. It helps in detecting trend changes.
Alpha Calculation: Alpha represents the adaptive factor that adjusts the sensitivity of the indicator. It is based on the MESA period and the phase of the InPhase component. Alpha helps in dynamically adjusting the indicator's responsiveness to changes in market conditions.
MAMA and FAMA Calculation: The MAMA and FAMA values are calculated using the adaptive factor (alpha) and the input price data. These values are essentially adaptive moving averages that aim to capture the current trend more effectively than traditional moving averages.
But Omar, why would anyone want to use this?
The MAMA and FAMA lines offer benefits:
The indicator offers a distinct advantage over conventional moving averages due to its adaptive nature, which allows it to adjust to changing market conditions. This adaptability ensures that investors can stay on the right side of the trend, as the indicator becomes more responsive during trending periods and less sensitive in choppy or sideways markets.
One of the key strengths of this indicator lies in its ability to identify trends effectively by combining the MESA and MAMA techniques. By doing so, it efficiently filters out market noise, making it highly valuable for trend-following strategies. Investors can rely on this feature to gain clearer insights into the prevailing trends and make well-informed trading decisions.
This indicator is primarily suppoest to be used on the big timeframes to see which trend is prevailing, however I am not against someone using it on a timeframe below the 1D, just be careful if you are using this for modern portfolio theory, this is not suppoest to be a mid-term component, but rather a long term component that works well with proper use of detrended fluctuation analysis.
Dont hesitate to ask me if you have any questions
Again, I want to give credit to Everget and ChartPrime!
Code explanation as required by House Rules:
fastLimit = input.float(title='Fast Limit', step=0.01, defval=0.01, group = "Indicator Settings")
slowLimit = input.float(title='Slow Limit', step=0.01, defval=0.08, group = "Indicator Settings")
src = input(title='Source', defval=close, group = "Indicator Settings")
input.float: Used to create input fields for the user to set the fastLimit and slowLimit values.
input: General function to get user inputs, like the data source (close price) used for calculations.
norm_period = input.int(3, 'Normalization Period', 1, group = "Normalized Settings")
norm = input.bool(defval = true, title = "Use normalization", group = "Normalized Settings")
input.int: Creates an input field for the normalization period.
input.bool: Allows the user to toggle normalization on or off.
Color settings in the code:
col_up = input.color(#22ab94, group = "Color Settings")
col_dn = input.color(#f7525f, group = "Color Settings")
Constants and functions
var float PI = math.pi
laplace(src) =>
(0.5) * math.exp(-math.abs(src))
_computeComponent(src, mesaPeriodMult) =>
out = laplace(src) * mesaPeriodMult
out
_smoothComponent(src) =>
out = 0.2 * src + 0.8 * nz(src )
out
math.pi: Represents the mathematical constant π (pi).
laplace: A function that applies the Laplace transform to the source data.
_computeComponent: Computes a component of the data using the Laplace transform.
_smoothComponent: Smooths data by averaging the current value with the previous one (nz function is used to handle null values).
Alpha function:
_computeAlpha(src, fastLimit, slowLimit) =>
mesaPeriod = 0.0
mesaPeriodMult = 0.075 * nz(mesaPeriod ) + 0.54
...
alpha = math.max(fastLimit / deltaPhase, slowLimit)
out = alpha
out
_computeAlpha: Calculates the adaptive alpha value based on the fastLimit and slowLimit. This value is crucial for determining the MAMA and FAMA lines.
Calculating MAMA and FAMA:
mama = 0.0
mama := alpha * src + (1 - alpha) * nz(mama )
fama = 0.0
fama := alpha2 * mama + (1 - alpha2) * nz(fama )
Normalization:
lowest = ta.lowest(mama_fama_diff, norm_period)
highest = ta.highest(mama_fama_diff, norm_period)
normalized = (mama_fama_diff - lowest) / (highest - lowest) - 0.5
ta.lowest and ta.highest: Find the lowest and highest values of mama_fama_diff over the normalization period.
The oscillator is normalized to a range, making it easier to compare over different periods.
And finally, the plotting:
plot(norm == true ? normalized : na, style=plot.style_columns, color=col_wn, title = "mama_fama_diff Oscillator Normalized")
plot(norm == false ? mama_fama_diff : na, style=plot.style_columns, color=col_wnS, title = "mama_fama_diff Oscillator")
Example of Normalized settings:
Example for setup:
Try to make sure the lower timeframe follows the higher timeframe if you take a trade based on this indicator!
Bitcoin Rainbow WaveBitcoin ultimate price model:
1. Power Law + 2. Rainbow Narrowing Bands + 3. Halving Cycle Harmonic Wave + 3. Wave bands
This powerful tool is designed to help traders of all levels understand and navigate the Bitcoin market. It works exclusively with BTC on any timeframe, but looks best on weekly or daily charts. The indicator provides valuable insights into historical price behavior and offers forecasts for the next decade, making it essential for both mid-term and long-term strategies.
How the Model Works
Power Law (Logarithmic Trend) : The green line represents the expected long-term price trajectory of Bitcoin based on a logarithmic regression model (power law). This suggests that Bitcoin's price generally increases as a power of 5.44 over time passed.
Rainbow Chart : Colored bands around the power law trend line illustrate a range of potential price fluctuations. The bands narrow esponentially over time, indicating increasing model accuracy as Bitcoin matures. This chart visually identifies overbought and oversold zones, as well as fair value zones.
Blue Zone : Below the power law trend, indicating an undervalued condition and a potential buying zone.
Green Zone : Around the power law trend, suggesting fair value.
Yellow Zone : Above the power law trend, but within the rainbow bands. Exercise caution, as the price may be overextended.
Red Zone : Far above the power law trend, indicating strong overbought conditions. Consider taking profits or reducing exposure.
Halving Cycle Wave : The fuchsia line represents the cyclical wave component of the model, tied to Bitcoin's halving events (approximately every four years). This wave accounts for the price fluctuations that typically occur around halvings, with price tending to increase leading up to a halving and correct afterwards. The amplitude of the wave decreases over time as the impact of halvings potentially lessens. Additional bands around the wave show the expected range of price fluctuations, aiding traders in making informed decisions.
Customizing Parameters
You can fine-tune the model's appearance by adjusting these input parameters:
show Power Law (true/false): Toggle visibility of the power law trend line.
show Wave (true/false): Toggle visibility of the halving cycle wave.
show Rainbow Chart (true/false): Toggle visibility of the rainbow bands.
show Block Marks (true/false): Toggle visibility of the 70,000 block interval markers.
Using the Model in Your Trading Strategy
Combine this indicator with technical analysis, fundamental analysis, and risk management techniques to develop a comprehensive Bitcoin trading strategy. The model can help you identify potential entry and exit points, assess market sentiment, and manage risk based on Bitcoin's position relative to the power law trend, halving cycle wave, and rainbow chart zones.
Harmonic Rolling VWAP (Zeiierman)█ Overview
The Harmonic Rolling VWAP (Zeiierman) indicator combines the concept of the Rolling Volume Weighted Average Price (VWAP) with advanced harmonic analysis using Discrete Fourier Transform (DFT). This innovative indicator aims to provide traders with a dynamic view of price action, capturing both the volume-weighted price and underlying harmonic patterns. By leveraging this combination, traders can gain deeper insights into market trends and potential reversal points.
█ How It Works
The Harmonic Rolling VWAP calculates the rolling VWAP over a specified window of bars, giving more weight to periods with higher trading volume. This VWAP is then subjected to harmonic analysis using the Discrete Fourier Transform (DFT), which decomposes the VWAP into its frequency components.
Key Components:
Rolling VWAP (RVWAP): A moving average that gives more weight to higher volume periods, calculated over a user-defined window.
True Range (TR): Measures volatility by comparing the current high and low prices, considering the previous close price.
Discrete Fourier Transform (DFT): Analyzes the harmonic patterns within the RVWAP by decomposing it into its frequency components.
Standard Deviation Bands: These bands provide a visual representation of price volatility around the RVWAP, helping traders identify potential overbought or oversold conditions.
█ How to Use
Identify Trends: The RVWAP line helps in identifying the underlying trend by smoothing out short-term price fluctuations and focusing on volume-weighted prices.
Assess Volatility: The standard deviation bands around the RVWAP give a clear view of price volatility, helping traders identify potential breakout or breakdown points.
Find Entry and Exit Points: Traders can look for entries when the price is near the lower bands in an uptrend or near the upper bands in a downtrend. Exits can be considered when the price approaches the opposite bands or shows harmonic divergence.
█ Settings
VWAP Source: Defines the price data used for VWAP calculations. The source input defines the price data used for calculations. This setting affects the VWAP calculations and the resulting bands.
Window: Sets the number of bars used for the rolling calculations. The window input sets the number of bars used for the rolling calculations. A larger window smooths the VWAP and standard deviation bands, making the indicator less sensitive to short-term price fluctuations. A smaller window makes the indicator more responsive to recent price changes.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Ichimoku Theories [LuxAlgo]The Ichimoku Theories indicator is the most complete Ichimoku tool you will ever need. Four tools combined into one to harness all the power of Ichimoku Kinkō Hyō.
This tool features the following concepts based on the work of Goichi Hosoda:
Ichimoku Kinkō Hyō: Original Ichimoku indicator with its five main lines and kumo.
Time Theory: automatic time cycle identification and forecasting to understand market timing.
Wave Theory: automatic wave identification to understand market structure.
Price Theory: automatic identification of developing N waves and possible price targets to understand future price behavior.
🔶 ICHIMOKU KINKŌ HYŌ
Ichimoku with lines only, Kumo only and both together
Let us start with the basics: the Ichimoku original indicator is a tool to understand the market, not to predict it, it is a trend-following tool, so it is best used in trending markets.
Ichimoku tells us what is happening in the market and what may happen next, the aim of the tool is to provide market understanding, not trading signals.
The tool is based on calculating the mid-point between the high and low of three pre-defined ranges as the equilibrium price for short (9 periods), medium (26 periods), and long (52 periods) time horizons:
Tenkan sen: middle point of the range of the last 9 candles
Kinjun sen: middle point of the range of the last 26 candles
Senkou span A: middle point between Tankan Sen and Kijun Sen, plotted 26 candles into the future
Senkou span B: midpoint of the range of the last 52 candles, plotted 26 candles into the future
Chikou span: closing price plotted 26 candles into the past
Kumo: area between Senkou pans A and B (kumo means cloud in Japanese)
The most basic use of the tool is to use the Kumo as an area of possible support or resistance.
🔶 TIME THEORY
Current cycles and forecast
Time theory is a critical concept used to identify historical and current market cycles, and use these to forecast the next ones. This concept is based on the Kihon Suchi (translating to "Basic Numbers" in Japanese), these are 9 and 26, and from their combinations we obtain the following sequence:
9, 17, 26, 33, 42, 51, 65, 76, 129, 172, 200, 257
The main idea is that the market moves in cycles with periods set by the Kihon Suchi sequence.
When the cycle has the same exact periods, we obtain the Taito Suchi (translating to "Same Number" in Japanese).
This tool allows traders to identify historical and current market cycles and forecast the next one.
🔹 Time Cycle Identification
Presentation of 4 different modes: SWINGS, HIGHS, KINJUN, and WAVES .
The tool draws a horizontal line at the bottom of the chart showing the cycles detected and their size.
The following settings are used:
Time Cycle Mode: up to 7 different modes
Wave Cycle: Which wave to use when WAVE mode is selected, only active waves in the Wave Theory settings will be used.
Show Time Cycles: keep a cleaner chart by disabling cycles visualisation
Show last X time cycles: how many cycles to display
🔹 Time Cycle Forecast
Showcasing the two forecasting patterns: Kihon Suchi and Taito Suchi
The tool plots horizontal lines, a solid anchor line, and several dotted forecast lines.
The following settings are used:
Show time cycle forecast: to keep things clean
Forecast Pattern: comes in two flavors
Kihon Suchi plots a line from the anchor at each number in the Kihon Suchi sequence.
Taito Suchi plot lines from the anchor with the same size detected in the anchored cycle
Anchor forecast on last X time cycle: traders can place the anchor in any detected cycle
🔶 WAVE THEORY
All waves activated with overlapping
The main idea behind this theory is that markets move like waves in the sea, back and forth (making swing lows and highs). Understanding the current market structure is key to having realistic expectations of what the market may do next. The waves are divided into Simple and Complex.
The following settings are used:
Basic Waves: allows traders to activate waves I, V and N
Complex Waves: allows traders to activate waves P, Y and W
Overlapping waves: to avoid missing out on any of the waves activated
Show last X waves: how many waves will be displayed
🔹 Basic Waves
The three basic waves
The basic waves from which all waves are made are I, V, and N
I wave: one leg moves
V wave: two legs move, one against the other
N wave: Three legs move, push, pull back, and another push
🔹 Complex Waves
Three complex waves
There are other waves like
P wave: contracting market
Y wave: expanding market
W wave: double top or double bottom
🔶 PRICE THEORY
All targets for the current N wave with their calculations
This theory is based on identifying developing N waves and predicting potential price targets based on that developing wave.
The tool displays 4 basic targets (V, E, N, and NT) and 3 extended targets (2E and 3E) according to the calculations shown in the chart above. Traders can enable or disable each target in the settings panel.
🔶 USING EVERYTHING TOGETHER
Please DON'T do this. This is not how you use it
Now the real example:
Daily chart of Nasdaq 100 futures (NQ1!) with our Ichimoku analysis
Time, waves, and price theories go together as one:
First, we identify the current time cycles and wave structure.
Then we forecast the next cycle and possible key price levels.
We identify a Taito Suchi with both legs of exactly 41 candles on each I wave, both together forming a V wave, the last two I waves are part of a developing N wave, and the time cycle of the first one is 191 candles. We forecast this cycle into the future and get 22nd April as a key date, so in 6 trading days (as of this writing) the market would have completed another Taito Suchi pattern if a new wave and time cycle starts. As we have a developing N wave we can see the potential price targets, the price is actually between the NT and V targets. We have a bullish Kumo and the price is touching it, if this Kumo provides enough support for the price to go further, the market could reach N or E targets.
So we have identified the cycle and wave, our expectations are that the current cycle is another Taito Suchi and the current wave is an N wave, the first I wave went for 191 candles, and we expect the second and third I waves together to amount to 191 candles, so in theory the N wave would complete in the next 6 trading days making a swing high. If this is indeed the case, the price could reach the V target (it is almost there) or even the N target if the bulls have the necessary strength.
We do not predict the future, we can only aim to understand the current market conditions and have future expectations of when (time), how (wave), and where (price) the market will make the next turning point where one side of the market overcomes the other (bulls vs bears).
To generate this chart, we change the following settings from the default ones:
Swing length: 64
Show lines: disabled
Forecast pattern: TAITO SUCHI
Anchor forecast: 2
Show last time cycles: 5
I WAVE: enabled
N WAVE: disabled
Show last waves: 5
🔶 SETTINGS
Show Swing Highs & Lows: Enable/Disable points on swing highs and swing lows.
Swing Length: Number of candles to confirm a swing high or swing low. A higher number detects larger swings.
🔹 Ichimoku Kinkō Hyō
Show Lines: Enable/Disable the 5 Ichimoku lines: Kijun sen, Tenkan sen, Senkou span A & B and Chikou Span.
Show Kumo: Enable/Disable the Kumo (cloud). The Kumo is formed by 2 lines: Senkou Span A and Senkou Span B.
Tenkan Sen Length: Number of candles for Tenkan Sen calculation.
Kinjun Sen Length: Number of candles for the Kijun Sen calculation.
Senkou Span B Length: Number of candles for Senkou Span B calculation.
Chikou & Senkou Offset: Number of candles for Chikou and Senkou Span calculation. Chikou Span is plotted in the past, and Senkou Span A & B in the future.
🔹 Time Theory
Show Time Cycle Forecast: Enable/Disable time cycle forecast vertical lines. Disable for better performance.
Forecast Pattern: Choose between two patterns: Kihon Suchi (basic numbers) or Taito Suchi (equal numbers).
Anchor forecast on last X time cycle: Number of time cycles in the past to anchor the time cycle forecast. The larger the number, the deeper in the past the anchor will be.
Time Cycle Mode: Choose from 7 time cycle detection modes: Tenkan Sen cross, Kijun Sen cross, Kumo change between bullish & bearish, swing highs only, swing lows only, both swing highs & lows and wave detection.
Wave Cycle: Choose which type of wave to detect from 6 different wave types when the time cycle mode is set to WAVES.
Show Time Cycles: Enable/Disable time cycle horizontal lines. Disable for better performance.
how last X time cycles: Maximum number of time cycles to display.
🔹 Wave Theory
Basic Waves: Enable/Disable the display of basic waves, all at once or one at a time. Disable for better performance.
Complex Waves: Enable/Disable complex wave display, all at once or one by one. Disable for better performance.
Overlapping Waves: Enable/Disable the display of waves ending on the same swing point.
Show last X waves: 'Maximum number of waves to display.
🔹 Price Theory
Basic Targets: Enable/Disable horizontal price target lines. Disable for better performance.
Extended Targets: Enable/Disable extended price target horizontal lines. Disable for better performance.
Diverging Chart Patterns - Ultimate [Trendoscope®]🎲 Presenting the Diverging Chart Patterns Ultimate Indicator
Much like its counterpart, the Converging Chart Patterns Ultimate indicator, this tool is an offshoot of our premium Auto Chart Patterns - Ultimate offering. However, it is exclusively designed to focus on diverging patterns.
🎲 Built on Extensive Research and Open-Source Foundations
Our journey toward creating this indicator has been guided by thorough research and insights gleaned from our previous works on Chart Patterns, which include:
Algorithmic Identification of Chart Patterns
Flag and Pennant Chart Patterns
Trading Diverging Chart Patterns
Drawing from the groundwork established by our publicly available indicators - Auto Chart Patterns and Flags and Pennants - this tool represents the culmination of our efforts to furnish traders with a refined approach to navigating diverging patterns. It not only facilitates the formulation of technical trading strategies but also aids in assessing their efficacy through historical performance analysis. The specific patterns addressed by this indicator encompass:
Rising Wedge (Diverging Type)
Falling Wedge (Diverging Type)
Diverging Triangle
Rising Triangle (Diverging Type)
Falling Triangle (Diverging Type)
🎲 Chart Pattern Scanning Methodology
Identifying diverging chart patterns follows a structured approach comprising several key steps:
Zigzag Examination : Start by analyzing each zigzag, focusing on the last 5 or 6 pivot points to pinpoint potential trend line pairs.
Divergence Verification : Project these trend lines backward and scrutinize for intersections within a specified number of bars prior. This step confirms the presence of divergence.
Pattern Categorization : Once divergence is confirmed, categorize each pattern based on the directional orientation of its trend lines. Refer to our article - Algorithmic Identification of Chart Patterns for detailed categorization guidelines.
🎲 Methodology or Trading for Chart Patterns
While traditional perspectives often prescribe specific trading biases to diverging patterns—for instance, labeling Rising Wedges as bearish and Falling Wedges as bullish, while acknowledging Triangles' versatility—there's limited empirical evidence to fully support these assumptions. Our indicator is crafted to empower users to explore and validate a wide range of trading hypotheses, including unconventional ones. This approach liberates trading strategies from being confined to historical market behaviors.
We offer extensive customization options to facilitate testing of diverse strategies. The initial setup accommodates both long and short trading scenarios for each identified pattern. Users retain the freedom to adjust trading directions and other parameters within the indicator's settings to align with their analytical preferences.
This open approach is grounded in the methodology detailed in - Trading Diverging Chart Patterns . It is exemplified by the following process, which users can customize and enhance using our indicator.
🎲 Insight into Indicator Components
The chart below provides an illustration of the components comprising our indicator:
Pattern Visualization : This functionality dynamically showcases patterns on the chart, emphasizing presently active ones. Historical patterns are omitted to uphold clarity and optimize performance, considering limitations in drawing object capacity.
Trading Annotations : The indicator conveniently denotes open trades directly on the chart, accommodating both long and short positions based on user preferences and the ongoing status of associated trades for each pattern.
Performance Metrics Table : A comprehensive table meticulously presents backtesting outcomes for individual patterns alongside aggregated results. It encompasses vital metrics such as win rates and the profit factor, calculated in alignment with the designated risk-reward ratio. These insights provide users with valuable assessments of potential profitability and trade strategy effectiveness.
🎲 Delving into the Indicator's Customization Features
Our indicator boasts a wealth of settings, empowering users to customize criteria and refine their trading strategies. Each setting comes with detailed tooltips, offering valuable insights into its functionality. Let's explore each category methodically.
🎯 Zigzag Configuration Options
These settings provide users with the flexibility to fine-tune their pattern analysis by adjusting the length and depth of the zigzag:
Length Adjustment : Altering this parameter modifies the scale of detected patterns. Higher values highlight larger formations, while lower ones focus on more compact patterns.
Depth Enhancement : This parameter adjusts the complexity of the recursive zigzag analysis, potentially revealing larger patterns across multiple levels. Users should exercise caution, as excessive depth may strain the indicator's processing capacity.
🎯 Pattern Scanning Settings
This collection of settings refines the pattern scanning process, typically adjusted to achieve precise geometric alignment of detected patterns. While many settings can be left at their default values for regular use, users are encouraged to customize them, particularly the "Last Pivot Direction," to explore different theoretical approaches to pattern trading.
🎯 Trade Configuration Settings
Arguably the most vital for users, these settings provide full control in shaping trading strategies based on diverging chart patterns. This encompasses the freedom to establish entry, stop, and target prices, fine-tune risk-reward ratios, choose historical depth for backtesting, and integrate filters to guide trade direction.
🎯 Pattern Specific Settings
Here, users have the flexibility to customize settings for individual patterns or groups, thereby refining the precision of their strategies. Alongside the option to enable/disable specific patterns and pattern groups, users can also choose pattern-specific settings such as Last Pivot Direction, Trade Direction Filter, and external filters.
🎯 Fully Customizable Alerts
Utilizing the alert() function, these notifications circumvent the usual template within the alert widget. To address this, we've integrated placeholders in the settings for creating comprehensive alert templates.
Available Categories Include
New - Alerts when a new pattern is identified
Entry - Alerts when an entry condition for a configured pattern based trade is met.
Stop - Alerts when a trade that has reached entry gets stopped out without reaching target
Target - Alerts when a trade reaches its target
Invalidation - Alerts when a trade reaches an invalidation point before reaching the entry.
Each alert type can possess its unique template. Tailorable templates are crucial for effectively utilizing alerts within broker or exchange integration.
Here are some of the placeholders that are defined in the indicator.
{type} - Alert type - new/entry/stop/target/invalid
{pid} - Pattern ID of the pattern belonging to trade. Multiple trades can have same pattern id since a pattern can be traded in both long and short directions.
{tid} - Unique Trade ID for the given trade.
{ticker} - Ticker ID on which the indicator is run
{timeframe} - Chart timeframe on which the indicator is run
{basecurrency} - Base currency of the symbol
{quotecurrency} - Quote currency of the symbol
{pivots} - Pivot values of the pattern
{price} - Current price when the alert is triggered.
{pattern} - Name of the pattern on which the alert is triggered.
{direction} - Direction of the trade.
{entrydirection} - Direction of the entry signal. Used for specific bot integration.
{exitdirection} - Direction of the exit signal. Used for specific bot integration.
{entry} - Entry price of the trade
{stop} - Stop price of the trade
{target} - Target price of the trade
{invalidation} - Invalidation price of the trade
🎯 Display and Stats
These settings regulate the display options on the chart. Closed trade statistics are showcased in a table and appear in the bottom-left corner of the chart. These can be tailored using the display settings.
Harmonic Patterns ScannerHello Traders!
The Harmonic Patterns Scanner takes the time-consuming search for harmonic patterns completely off your hands. This indicator utilizes a unique swing-based pattern recognition to pinpoint 14 different bullish and bearish harmonic patterns in real-time with unparalleled precision.
The Harmonic Patterns Scanner is designed to operate in a fully automated manner, detecting harmonic patterns in real-time across the symbol and timeframe that you select. It grants you the ability to simultaneously scan for patterns across as many as 20 distinct symbols.
Pattern List (each pattern has a bullish and a bearish version)
Gartley
Bat
Butterfly
Crab
Cypher
Shark
5-0
Feature List
Automatic real-time pattern detection
7 different built-in breakout conditions
Breakout alerts
Customizable pattern size and accuracy
Customizable look and feel
The value of this indicator is to support traders to easily identify harmonic patterns. The trader saves a lot of time scanning the markets for harmonic patterns, since finding the pattern and alerting for a breakout is done automatically for the trader.
For a visualization of the detected patterns, you can add the TRN Harmonic Patterns Suite indicator to your chart.
How does TRN Harmonics Scanner work?
On the right side of the chart, you can find a table displaying the symbols monitored by our scanner for pattern and breakout detection. The table is divided into bullish and bearish patterns and provides information on the status of each symbol.
UP – Upside Breakout
DN – Downside Breakout
UP CONF – Upside Breakout confirmed
DN CONF – Downside Breakout confirmed
FAILED – Pattern failed to get confirmed
If a pattern is in the making or already got confirmed, the scanner displays the name of the harmonic pattern in the table.
The scanner operates specifically on the timeframe you have selected in TradingView, ensuring that the detected patterns and breakouts align precisely with your trading perspective. If the scanner displays a pattern or a breakout, you just can switch to this instrument and start trading it if you like what you see.
Follow these instructions to discover how you can utilize the scanner for seamless and simplified chart pattern detection like never before:
Add Symbols
Go to indicator settings and scroll down to the "Symbols" section. The enabled symbols can be recognized by the check marks. Click on one of them and use the search function to add the symbol of your choice to the scanner. You can search for up to 20 different symbols at the same time.
Use Alerts (Optional but Recommended)
You can also use the built-in alerts to easily get notified when a pattern occurs. In the indicator settings in the "Alerts" section you can choose whether you want to get notified when a pattern is
1. in the making (Pattern active),
2. confirms an up breakout (B/O Up Confirmed)
3. confirms a down breakout (B/O Down Confirmed)
4. (Unconfirmed) in case a pattern breakout occurs, even if the pattern is not yet confirmed
This allows you to stay informed about potential breakout opportunities.
Customization and settings
The indicator can scan for smaller and larger patterns. Adjust the harmonics size in the indicator settings to align them with your preferences. A larger size results in larger patterns. Depending on the asset class, the market or the market phase, different sizes can be used for pattern detection.
To detect more patterns, increase the tolerance level, even though it may result in lower accuracy. However, be mindful that a higher tolerance level may result in more patterns hitting their stop-loss.
Breakout Conditions
Identifying breakout conditions is paramount for successfully profiting on chart patterns. Trading tools equipped with diverse breakout conditions offer traders a comprehensive approach to deciphering market trends and making informed decisions.
This section delves into the set of breakout conditions built within the Harmonic Pattern Scanner, exploring their functionalities, applications, and the benefits they provide in the realm of chart pattern recognition.
TRN Bars Signal + Trend
The Harmonic Pattern Scanner includes also the TRN Bars algorithm. It is designed to spot bullish and bearish trends and reversals. The trend analysis is based on a new algorithm that weights several different inputs:
1. classical and advanced bar patterns and their statistical frequency
2. probability distributions of price expansions after certain bar patterns
3. bar information such as wick length in %, overlapping of the previous bar in % and many more
4. historical trend and consolidation analysis
If you use this breakout condition, the breakout is determined by the next signal (reversal, continuation, breakout) or trend change of the TRN bars after one of the harmonic patterns has been completed. These Breakout conditions give you the accurate trend recognition of the TRN Bars to find the perfect entry.
TRN Bars Signal
If a harmonic pattern gets completed and you use this breakout condition, the breakout will be determined by the next confirmed signal (reversal, continuation, breakout) of the TRN Bars. These Breakout Condition delivers signals with reenforced reliability, but they occur not as often as other breakout conditions.
RSI Crossing
With this breakout condition, a breakout for a long position gets determined, when the RSI line crosses above the RSI moving average (MA) after one of the harmonic patterns has been completed. A bearish breakout after a completed harmonic pattern gets determined, when the RSI line crosses below the RSI MA.
You can choose your preferred RSI and MA length in the indicator settings under the “Trade Management” section.
MACD Crossing
If a harmonic pattern gets completed and you use this breakout condition, the breakout gets determined, when the MACD line crosses above the signal line (bullish MACD crossover) for a bullish breakout. Conversely, when the MACD line crosses below the signal line (bearish MACD crossover), a bearish breakout gets determined after a harmonic pattern was completed.
You can choose your preferred MACD length in the indicator settings under the “Trade Management” section.
Swing Flip
Use this breakout condition, if you want a breakout to get determined when the next swing after point D gets detected by the build in swing detection algorithm of TRN Harmonics.
Close Below/Above Last 2 Lows/Highs
With this breakout condition, a breakout for a short position gets determined, if a close below the lows of the last 2 bars gets detected. For a long position, the breakout gets determined if a close above the highs of the last 2 bars gets detected.
Close Below/Above Last 3 Lows/Highs
In this scenario, a short position breakout is confirmed if the price closes below the lows of the previous 3 bars. Conversely, a long position breakout is confirmed if the price closes above the highs of the last 3 bars.
How To Setup Breakout Conditions
Go to indicator settings and choose one of our built-in breakout conditions under the section "Trade Management" of the menu item "Inputs", like for example TRN Bars Signal + Trend. A selection of 7 distinct breakout conditions is at your disposal.
Computation Details
The real-time detection of the harmonic patterns utilizes a unique swing-based pattern recognition. The difference to other swing-based computations is that the pivot points are identified without a look-ahead value. The result is a faster and better real-time detection. The tolerance level unites several internal parameters into one and results in a user-friendly setting.
Risk Disclaimer
The content, tools, scripts, articles, and educational resources offered by TRN Trading are intended solely for informational and educational purposes. Remember, past performance does not ensure future outcomes.
Unmitigated Liquidity Imbalances [AlgoAlpha]🎉 Introducing the Unmitigated Liquidity Imbalance Indicator by AlgoAlpha! 🎉
Dive into the depths of market analytics with our "Unmitigated Liquidity Imbalance" indicator. This tool harnesses unique algorithms to detect liquidity imbalances between bulls and bears, helping traders spot trends and potential entry and exit points with greater accuracy. 📈🚀
🔍 Key Features:
🌟 Advanced Analysis : Analyses candle direction and length to forecast market peaks and valleys.
🎨 Customizable Visuals : Tailor the chart with your choice of bullish green or bearish red to reflect different market conditions.
🔄 Real-Time Updates : Continuously updates to reflect live market changes.
🔔 Configurable Alerts : Set up alerts for key trading signals such as bullish and bearish reversals, as well as trend shifts.
📐 How to Use:
🛠 Add the Indicator : Add the indicator to your favourites and customize the settings to suite your needs.
📊 Market Analysis : Monitor the oscillator threshold; readings above 0.5 suggest bullish sentiment, while below 0.5 indicate bearish conditions. And reversal signals are displayed to show potential entry points.
🔔 Set Alerts : Enable notifications for reversal conditions or trend changes to seize trading opportunities without constant chart watching.
🧠 How It Works:
The core mechanism of the indicator is based on detecting changes in candlestick size and direction to identify bullish and bearish liquidity levels from the peak & valley indicator's logic. By comparing the length of a current candle to the previous one and checking the change in direction, it pinpoints moments where market sentiment could be shifting, indicating if the liquidity at that point is bullish or bearish. The script then looks at what percentage of the past few unmitigated levels are bullish or bearish based on a customizable lookback and determines the liquidity imbalance which can then be interpreted as trend.
Empower your trading with the Unmitigated Liquidity Imbalance indicator and navigate the markets with confidence and precision. 🌟💹
Happy trading, and may your charts be ever in your favour! 🥳✨
💎 Related Indicator
Harmonic Patterns SuiteHello Traders!
This indicator takes the time-consuming search for harmonic patterns completely off your hands. TRN Harmonics utilizes a unique swing-based pattern recognition to pinpoint 14 different harmonic patterns in real-time with unparalleled precision.
Pattern List (each pattern has a bullish and a bearish version)
Gartley
Bat
Butterfly
Crab
Cypher
Shark
5-0
Feature List
Real-time harmonic pattern detection
7 different built-in breakout conditions
Visualization of entry, stop-loss and take-profit levels
Pattern performance statistics
Calculation of risk-rewards ratio
Risk Management
Breakout alerts
Customizable pattern size and accuracy
Customizable look and feel
The value of this indicator is to support traders to easily identify harmonic patterns in an automated way. The special swing-based pattern recognition and the numerous built-in premium features make this indicator unique. The trader saves a lot of time scanning the markets for harmonic patterns, since everything is done automatically for the trader: Finding the pattern, looking and alerting for a breakout, computing the entry, stop loss and take profit levels as well as handling the risk management and computing the optimal order quantity.
How to Trade with the Harmonic Patterns Suite
Identify the Pattern
Add the Harmonic Patterns Suite to your chart and look for patterns on the asset and timeframe of your choice. The patterns are detected in real-time. If a pattern develops further in the next bars, then the indicator updates the pattern accordingly until a breakout is confirmed or the pattern becomes invalid.
You can also use the built-in alerts to easily get notified when a pattern occurs. In the indicator settings in the "Alerts" section you can choose whether you want to get notified when a pattern is
1. in the making (Pattern active),
2. confirms an up breakout (B/O Up Confirmed)
3. confirms a down breakout (B/O Down Confirmed)
4. (Unconfirmed) in case a pattern breakout occurs, even if the pattern is not yet confirmed
This allows you to stay informed about potential breakout opportunities that are still awaiting confirmation.
Check Pattern Statistics
The pattern statistics make it easy for you to see how successful a pattern is on the asset and timeframe you are watching. You should always check the statistics before entering a trade. The chart displays the statistics in the upper right corner. These statistics are categorized into two sections: "long" for patterns with an upward breakout and "short" for patterns with a downward breakout.
In the initial columns, labeled as "short" and "long", the identified breakouts are further divided based on the different harmonic patterns. The following columns represent the count of the events:
1. Occ. (Occurrence) categorized according to the values of R from the first column
2. TP1, TP2 (Take Profit) - targets 1 und 2
3. SL (Stop Loss)
4. T/O (Time Out) - neither stop loss or targets where hit in a certain amount of time
Breakout – Entry, Stop Loss and Targets
The indicator automatically displays the entry price line (EP) in grey at the point where the breakout got detected. Once a breakout has been confirmed, place a buy order near the EP level for a long position, or a sell order for a short position. Set your stop-loss at the price level of the red stop-loss line (SL) and set your take-profits at the price level of the green take-profit-lines (TP1, TP2).
Risk Management
The Harmonic Patterns Suite comes with a built-in risk management feature. Just go to the settings and scroll down to the section "Risk Management". Here you can enter your Account Size and the percentage you want to Risk when you enter a position after a pattern breakout.
In the "Trade Management" section, you have the option to define the minimum accepted risk-reward ratio for confirmed harmonic patterns. This means that breakouts of patterns failing to meet the minimum risk-reward ratio will not be considered as confirmed signals. If a breakout gets confirmed, the indicator automatically calculates the position size (Quantity). You can read the quantity from the gray entry point line (EP), which is located to the right of the risk-reward ratio (R). Note that your risk-reward ratio (R) is calculated based on TP1.
Customization and settings
The indicator can scan for smaller and larger patterns at the same time. Adjust the harmonics size in the indicator settings to align them with your preferences. A larger size results in larger consolidations. Depending on the asset class, the market or the market phase, different sizes can be used for pattern detection.
To detect more patterns, increase the tolerance level, even though it may result in lower accuracy. However, be mindful that a higher tolerance level may result in more patterns hitting their stop-loss. Look for a tolerance level that leads to favorable statistics and focus on trading patterns with a proven performance history.
Finally, you have the flexibility to customize various visual elements, such as the color of the pattern and whether to display values like price, target, or risk-reward ratio on your chart. You can also choose where these values appear.
Breakout Conditions
Identifying breakout conditions is paramount for successfully recognizing and capitalizing on chart patterns. Trading tools equipped with diverse breakout conditions offer traders a comprehensive approach to deciphering market trends and making informed decisions.
This section delves into the set of breakout conditions built within TRN Harmonics, exploring their functionalities, applications, and the benefits they provide in the realm of chart pattern recognition.
TRN Bars Signal + Trend
The Harmonics Pattern Suite includes also the TRN Bars algorithm. It is designed to spot bullish and bearish trends and reversals. The trend analysis is based on a new algorithm that weights several different inputs:
1. classical and advanced bar patterns and their statistical frequency
2. probability distributions of price expansions after certain bar patterns
3. bar information such as wick length in %, overlapping of the previous bar in % and many more
4. historical trend and consolidation analysis
If you use this breakout condition, the breakout is determined by the next signal (reversal, continuation, breakout) or trend change of the TRN bars after one of the harmonic patterns has been completed. These Breakout conditions give you the accurate trend recognition of the TRN Bars to find the perfect entry.
TRN Bars Signal
If a harmonic pattern gets completed and you use this breakout condition, the breakout will be determined by the next confirmed signal (reversal, continuation, breakout) of the TRN Bars. These Breakout Condition delivers signals with reenforced reliability, but they occur not as often as other breakout conditions.
RSI Crossing
With this breakout condition, a breakout for a long position gets determined, when the RSI line crosses above the RSI moving average (MA) after one of the harmonic patterns has been completed. A bearish breakout after a completed harmonic pattern gets determined, when the RSI line crosses below the RSI MA.
You can choose your preferred RSI and MA length in the indicator settings under the “Trade Management” section.
MACD Crossing
If a harmonic pattern gets completed and you use this breakout condition, the breakout gets determined, when the MACD line crosses above the signal line (bullish MACD crossover) for a bullish breakout. Conversely, when the MACD line crosses below the signal line (bearish MACD crossover), a bearish breakout gets determined after a harmonic pattern was completed.
You can choose your preferred MACD length in the indicator settings under the “Trade Management” section.
Swing Flip
Use this breakout condition, if you want a breakout to get determined when the next swing after point D gets detected by the build in swing detection algorithm of TRN Harmonics.
Close Below/Above Last 2 Lows/Highs
With this breakout condition, a breakout for a short position gets determined, if a close below the lows of the last 2 bars gets detected. For a long position, the breakout gets determined if a close above the highs of the last 2 bars gets detected.
Close Below/Above Last 3 Lows/Highs
In this scenario, a short position breakout is confirmed if the price closes below the lows of the previous 3 bars. Conversely, a long position breakout is confirmed if the price closes above the highs of the last 3 bars.
How To Setup Breakout Conditions
Go to indicator settings and choose one of our built-in breakout conditions under the section "Trade Management" of the menu item "Inputs", like for example TRN Bars Signal + Trend. A selection of 7 distinct breakout conditions is at your disposal.
If you use the default settings of the Harmonic Patterns Suite, TRN Bars Signal + Trend will be the breakout condition for the detected harmonic patterns.
Computation Details
The real-time detection of the harmonic patterns utilizes a unique swing-based pattern recognition. The difference to other swing-based computations is that the pivot points are identified without a look-ahead value. The result is a faster and better real-time detection. Furthermore, the detection of the ratios between the single swings is based on a dynamic volatility measurement similar to the ATR. The tolerance level unites several internal parameters into one and results in a user-friendly setting.
Risk Disclaimer
The content, tools, scripts, articles, and educational resources offered by TRN Trading are intended solely for informational and educational purposes. Remember, past performance does not ensure future outcomes.
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.
Bearish Cassiopeia C Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bearish Cassiopeia C harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia C Harmonic Patterns
• Bullish Cassiopeia C patterns are fundamentally composed of three troughs and two peaks. The second peak being higher than the first peak. And the third trough being lower than both the first and second troughs, while the second trough is higher than the first.
• Bearish Cassiopeia C patterns are fundamentally composed of three peaks and two troughs. The second trough being lower than the first trough. And the third peak being higher than both the first and second peaks, while the second peak is lower than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
Bullish Cassiopeia C Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bullish Cassiopeia C harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia C Harmonic Patterns
• Bullish Cassiopeia C patterns are fundamentally composed of three troughs and two peaks. The second peak being higher than the first peak. And the third trough being lower than both the first and second troughs, while the second trough is higher than the first.
• Bearish Cassiopeia C patterns are fundamentally composed of three peaks and two troughs. The second trough being lower than the first trough. And the third peak being higher than both the first and second peaks, while the second peak is lower than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
Bearish Cassiopeia B Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bearish Cassiopeia B harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia B Harmonic Patterns
• Bullish Cassiopeia B patterns are fundamentally composed of three troughs and two peaks. The second peak being lower than the first peak. And the third trough being lower than both the first and second troughs, while the second trough is also lower than the first.
• Bearish Cassiopeia B patterns are fundamentally composed of three peaks and two troughs. The second trough being higher than the first trough. And the third peak being higher than both the first and second peaks, while the second peak is also higher than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
Bullish Cassiopeia B Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bullish Cassiopeia B harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia B Harmonic Patterns
• Bullish Cassiopeia B patterns are fundamentally composed of three troughs and two peaks. The second peak being lower than the first peak. And the third trough being lower than both the first and second troughs, while the second trough is also lower than the first.
• Bearish Cassiopeia B patterns are fundamentally composed of three peaks and two troughs. The second trough being higher than the first trough. And the third peak being higher than both the first and second peaks, while the second peak is also higher than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
Bearish Cassiopeia A Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bearish Cassiopeia A harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia A Harmonic Patterns
• Bullish Cassiopeia A patterns are fundamentally composed of three troughs and two peaks. The second peak being higher than the first peak. And the third trough being higher than both the first and second troughs, while the second trough is also higher than the first.
• Bearish Cassiopeia A patterns are fundamentally composed of three peaks and two troughs. The second trough being lower than the first trough. And the third peak being lower than both the first and second peaks, while the second peak is also lower than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
Bullish Cassiopeia A Harmonic Patterns [theEccentricTrader]█ OVERVIEW
This indicator automatically detects and draws bullish Cassiopeia A harmonic patterns and price projections derived from the ranges that constitute the patterns.
Cassiopeia A, B and C harmonic patterns are patterns that I created/discovered myself. They are all inspired by the Cassiopeia constellation and each one is based on different rotations of the constellation as it moves through the sky. The range ratios are also based on the constellation's right ascension and declination listed on Wikipedia:
Right ascension 22h 57m 04.5897s–03h 41m 14.0997s
Declination 77.6923447°–48.6632690°
en.wikipedia.org
I actually developed this idea quite a while ago now but have not felt audacious enough to introduce a new harmonic pattern, let alone 3 at the same time! But I have since been able to run backtests on tick data going back to 2002 across a variety of market and timeframe combinations and have learned that the Cassiopeia patterns can certainly hold their own against the currently known harmonic patterns. As can be seen in the picture above the bullish Cassiopeia A caught the 2009 bear market bottom almost perfectly.
I would also point out that the Cassiopeia constellation does actually look like a harmonic pattern and the Cassiopeia A star is literally the 'strongest source of radio emission in the sky beyond the solar system', so its arguably more of a real harmonic phenomenon than the current patterns.
www.britannica.com
chandra.si.edu
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Retracement and Extension Ratios
Retracement and extension ratios are calculated by dividing the current range by the preceding range and multiplying the answer by 100. Retracement ratios are those that are equal to or below 100% of the preceding range and extension ratios are those that are above 100% of the preceding range.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Harmonic Patterns
The concept of harmonic patterns in trading was first introduced by H.M. Gartley in his book "Profits in the Stock Market", published in 1935. Gartley observed that markets have a tendency to move in repetitive patterns, and he identified several specific patterns that he believed could be used to predict future price movements.
Since then, many other traders and analysts have built upon Gartley's work and developed their own variations of harmonic patterns. One such contributor is Larry Pesavento, who developed his own methods for measuring harmonic patterns using Fibonacci ratios. Pesavento has written several books on the subject of harmonic patterns and Fibonacci ratios in trading. Another notable contributor to harmonic patterns is Scott Carney, who developed his own approach to harmonic trading in the late 1990s and also popularised the use of Fibonacci ratios to measure harmonic patterns. Carney expanded on Gartley's work and also introduced several new harmonic patterns, such as the Shark pattern and the 5-0 pattern.
The bullish and bearish Gartley patterns are the oldest recognized harmonic patterns in trading and all the other harmonic patterns are ultimately modifications of the original Gartley patterns. Gartley patterns are fundamentally composed of 5 points, or 4 waves.
Bullish and Bearish Cassiopeia A Harmonic Patterns
• Bullish Cassiopeia A patterns are fundamentally composed of three troughs and two peaks. The second peak being higher than the first peak. And the third trough being higher than both the first and second troughs, while the second trough is also higher than the first.
• Bearish Cassiopeia A patterns are fundamentally composed of three peaks and two troughs. The second trough being lower than the first trough. And the third peak being lower than both the first and second peaks, while the second peak is also lower than the first.
The ratio measurements I use to detect the patterns are as follows:
• Wave 1 of the pattern, generally referred to as XA, has no specific ratio requirements.
• Wave 2 of the pattern, generally referred to as AB, should retrace by at least 11.34%, but no further than 22.31% of the range set by wave 1.
• Wave 3 of the pattern, generally referred to as BC, should extend by at least 225.7%, but no further than 341% of the range set by wave 2.
• Wave 4 of the pattern, generally referred to as CD, should retrace by at least 77.69%, but no further than 88.66% of the range set by wave 3.
Measurement Tolerances
In general, tolerance in measurements refers to the allowable variation or deviation from a specific value or dimension. It is the range within which a particular measurement is considered to be acceptable or accurate. In this script I have applied this concept to the measurement of harmonic pattern ratios to increase to the frequency of pattern occurrences.
For example, the AB measurement of Gartley patterns is generally set at around 61.8%, but with such specificity in the measuring requirements the patterns are very rare. We can increase the frequency of pattern occurrences by setting a tolerance. A tolerance of 10% to both downside and upside, which is the default setting for all tolerances, means we would have a tolerable measurement range between 51.8-71.8%, thus increasing the frequency of occurrence.
█ FEATURES
Inputs
• AB Lower Tolerance
• AB Upper Tolerance
• BC Lower Tolerance
• BC Upper Tolerance
• CD Lower Tolerance
• CD Upper Tolerance
• Pattern Color
• Label Color
• Show Projections
• Extend Current Projection Lines
Alerts
Users can set alerts for when the patterns occur.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
█ NOTES
I know a few people have been requesting a single indicator that contains all my patterns and I definitely hear you on that one. However, I have been very busy working on other projects while trying to trade and be a human at the same time. For now I am going to maintain my original approach of releasing each pattern individually so as to maintain consistency. But I am now also working on getting my some of my libraries ready for public release and in doing so I will finally be able to fit all patterns into one script. I will also be giving my scripts some TLC by making them cleaner once I have the libraries up and running. Please bear with me in the meantime, this may take a while. Cheers!
WinningWave - Eylem - By [Sercan.B]"WinningWave - Eylem" is designed as an auxiliary oscillator to the "WinningWave - Devrim" indicator. This specialized tool stands out for its ability to generate buy-sell signals that are compatible with the harmonic formations identified by Devrim. While the primary indicator, Devrim, is utilized to determine harmonic formations and potential trend reversal points in the market, the Eylem indicator provides compatible signals following the formation of these patterns, helping investors to capitalize on these opportunities optimally.
"WinningWave - Eylem" is crafted to predict market momentum and trend reversals based on the formations detected by the Devrim indicator. This synergy offers investors sharp awareness to act when formations are completed and new trends are about to commence.
When used together with Devrim, the Eylem indicator enables investors to analyze market movements from a broader perspective and base their investment decisions on a stronger foundation. In addition to harmonic formations, this auxiliary oscillator, which can adapt to market dynamics, provides investors with a significant tool for determining market entry and exit points. Thus, WinningWave - Eylem enhances Devrim's analytical capabilities, facilitating the process of making informed investments in the financial markets.
Please be aware that using this oscillator alone may lead to financial losses. Remember, it is designed to be an auxiliary oscillator.
Note: In line with my personal impartiality principles, the definition and usage of the indicator were created by analyzing the codes via ChatGPT.
Important note: The indicator is a confirmation oscillator for the buy section. Its function is to confirm the indicator on the main screen.
- As seen in the image, the ''Eylem'' indicator is the auxiliary oscillator of the "Devrim" indicator. Buy and Sell signals have been changed to "Rocket" and "Bear" emojis.
-The Rocket emoji represents the buying areas during the formation periods of harmonic formations.
-The Bear emoji represents the selling areas during the formation periods of harmonic formations.
-Winningwave is the auxiliary oscillator of the Devrim indicator. Its use alone can lead to financial loss.
WinningWave - Devrim - By [Sercan.B]WinningWave - Devrim is an extremely advanced technical analysis tool designed to understand fluctuations in the financial markets and provide investors with reliable buying and selling decisions based on this information. This tool integrates various analysis methods to detect market trends and potential reversal points.
Fundamentally, WinningWave - Devrim deeply examines market movements using ZigZag analyses, harmonic pattern recognition, and various indicators such as RSI. ZigZag analyses filter out the noise of short-term price movements, offering a cleaner view of market trends and identifying significant peaks and troughs. The harmonic pattern recognition feature utilizes the recurring nature of specific price patterns to indicate potential buying and selling areas. These patterns provide clues about the possible future directions of price movements.
The strength of WinningWave - Devrim lies not only in identifying specific patterns and trends but also in presenting this information in a way that can be integrated into investors' strategies. Investors can clearly see when to enter or exit the market, thanks to the visual signals and patterns provided by the indicator.
Moreover, WinningWave - Devrim offers a set of customizable settings according to user preferences. This feature is critical for adapting to different market conditions and investment strategies. For example, an investor can adjust the ATR period, which measures volatility, to receive the most suitable signals for the current market condition.
Thanks to the specially tailored artificial intelligence coding for pattern finding for each time period, it alerts the user as a formation by analyzing the possible start and end areas of Trends specific to time periods. Additionally, a buy and sell signal compatible with harmonic pattern-based trend scanning technique accompanies harmonic formations. The buy or sell signal that comes immediately after the formation is created provides detailed awareness for the user to enter or exit the game.
The option to set separate alerts for the formation of each pattern and for every buy-sell signal frees users from the necessity of monitoring the screen constantly.
Lastly, WinningWave - Devrim offers investors a broad perspective for market analysis. With this tool, investors can identify market trends, potential reversal points, and buying and selling opportunities, optimize risk management, and apply their investment strategies more consciously.
Note: In line with my principle of personal neutrality, the description and usage of the indicator have been written by analyzing the codes through ChatGPT.
- Adhering to buy and sell signals is crucial for securing transactions at points where harmonic patterns form. This importance stems from the fact that the legs of harmonic formations can extend according to Fibonacci values. In other words, a harmonic formation signal does not have to occur immediately when it is received. Therefore, buy and sell signal labels, transformed into signals with settings compatible with formations and based on ATR, aim to minimize the margin of error in transactions.
- Harmonic formations are an analysis method in financial markets that is based on specific mathematical properties and ratios of price movements. These formations rely on mathematical concepts such as the Fibonacci number sequence and are used to predict how price movements may behave in the future. The idea behind harmonic formations is that certain patterns tend to repeat in market price movements. These patterns are used to identify potential buying and selling points.
- Paintings are representative. It was drawn for those who cannot see that zigzag lines and formation labels create mathematics and a formation.
- The Super Trend ATR (Average True Range) is a popular trend-following indicator used in financial markets. This indicator creates a line that moves above or below the price as a function of the Average True Range (ATR), indicating the direction of the trend. The Super Trend is used both to determine the direction of the trend and to identify potential entry and exit points.
The Super Trend indicator is based on two main parameters: a period of the ATR and a multiplier. The indicator measures the volatility of price movements over the specified ATR period and applies a multiplier based on this volatility. Then, this calculated value is placed above or below the price to determine the direction of the trend. If the price is above the line, the market is considered to be in an uptrend, and if below, in a downtrend.
Buy and Sell signals were written in the most compatible way with harmonic formations for the Super Trend ATR and adjusted according to the most accurate areas of Fibonacci values. Thus, if the signal following the formation of harmonic formations is entering an uptrend or downtrend, it helps us find the most suitable entry and exit points.
- Zigzag Indicator
The Zigzag indicator is a tool that filters out minor price fluctuations and noise to better see the direction of price movements. This indicator ignores price movements until they reach a specified percentage change and only connects the movements that exceed this change with a line. As a result, investors can more easily identify the main trends and potential reversal points in the market.
The Zigzag indicator is particularly effective in identifying the maximum and minimum points in the market and when used in conjunction with other technical analysis tools like Fibonacci retracement.
Pivot Points
Pivot points are a type of indicator used to determine the general trend of the market. This calculation is made using the high, low, and closing prices of the previous period. The basic pivot point is calculated by taking the average of these three values. Around this basic pivot point, resistance and support levels are also calculated. Resistance levels represent potential obstacles that the price may encounter moving upwards, while support levels represent potential "floor" areas when the price is moving downwards.
Pivot points are especially useful for daily trading activities because traders can use these points to predict the likely direction of market movements within the day. These points can also serve as potential buying and selling areas.
Both indicators assist investors and traders in analyzing market movements and making decisions, but it is always recommended to use them in conjunction with other analysis methods and consider market conditions.