This script identifies chart patterns: wedges, flags, triangles on the chart
It has many settings. You can choose by which extremums you want to identify patterns - by the edges of wicks (tails, shadows), or by the edges of candle bodies .
You can also adjust the accuracy - how smooth and accurate the shapes must be in order for them to be considered wedges...