Hi, 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...
This script finds the Cups and you can use it while analysing the symbols. it creates circle and channel for the potential Cups and checks the number of bars included by the channel, if included bars is equal or greater than the value you set then it shows the cup.
"Number for Bars to search" : Maximum length of a Cup