Cup and Handle chart patternThis script identifies chart patterns: Cup and Handle. At the same time, it identifies not only these classical patterns, but even a wider range of similar reverse figures .
It has many useful settings:
-- You can choose by which pivots you want to identify patterns - by the edges of wicks (tails, shadows), or by the edges of candle bodies.
-- You can set the minimum number of pivot points that the pattern must contain.
-- You can also set the minimum depth of the shapes. It is important for successful trading.
-- !!! Most importantly, I have added a very useful functionality for those who trade based on chart patterns. Unlike my previous scripts which only identified patterns, in this one I've added the functionality to filter out patterns that I think appear in the wrong places . It is the base level filter. It filters out many, but not all, patterns in inappropriate places. If you want to order the development of such functionality with great opportunities - please contact me.
-- In addition, you can set how "flat" relative to the horizon the identified patterns should be .
You can also customize your styles.
! All key settings are accompanied by detailed tooltips
Cuphandle
Cup & HandleHi, here is my take on 'Cup & Handle'
Pivot Points - ph (highest points in a certain period) are stored in an array
When there is a new ph , previous ph's are compared to the latest one.
A temporary test line is drawn between these 2 points.
The script checks if a close (between these 2 points) doesn't break above this test line.
(test line is deleted afterwards)
If it doesn't, and the '% max breaks' are not breached, 2 circle shaped lines are drawn
(Top & Bottom line of the cup) which forms the Cup, together with the Handle.
The red box (Handle) is the maximum 33-50% retracement (% of cup height)
-> Only the latest pattern is shown, enabling 'Show Cup labels' shows the position of cup patterns in history.
They can be visualised by using 'Bar Replay'
'% max breaks' -> 'maximum highs/lows breaking through the Top/Bottom line
(% of bars between left & right extreme points of the Cup)
Settings:
- 'Left', 'Right' -> regulates Pivot Point values
- 'PP back' -> max lookback for Pivot High
More explanation can be found in following print screens,
or by checking the tooltips in the settings
Cheers!
Cup and Handle IndicatorThis is a Cup and Handle Indicator. Features include:
Can set alert at any point after handle starts rising before breakout
Can detect multiple tops before confirming cup and handle pattern, not just double.
Many settings to adjust to meet your exact requirements
The functionality of this indicator is very similar to my double top indicator , and inherits majority of the settings/inputs. Please try that indicator before using this one.
From Wikipedia: In the domain of technical analysis of market prices, a cup and handle or cup with handle formation is a chart pattern consisting of a drop in the price and a rise back up to the original value, followed first by a smaller drop and then a rise past the previous peak. It is interpreted as an indication of bullish sentiment in the market and possible further price increases.
The cup part of the pattern should be fairly shallow, with a rounded or flat "bottom" (not a V-shaped one), and ideally reach to the same price at the upper end of both sides. The drop of the handle part should retrace about 30% to 50% of the rise at the end of the cup. For stock prices, the pattern may span from a few weeks to a few years; but commonly the cup lasts from 1 to 6 months, while the handle should only last for 1 to 4 weeks.
The "cup and handle" formation was defined by William O'Neil"
Key settings to note compared to my double top indicator are highlighted in following image
PM me to obtain access
Best regards.