Double Top/Bottom - UltimateHellow traders, this is my final script regarding double top/bottom pattern recognition. This script is built based on zig zag indicator whereas the previous ones are built based on pivot points.
Double Top:
Recognition - Checks on Zigzag if LH is followed by HH
Confirmation - When low crosses under last lower pivot point on zigzag
Invalidation - When high crosses over HH
Double Bottom:
Recognition - Checks on Zigzag if HL is followed by LL
Confirmation - When high crosses over last higher pivot point on zigzag
Invalidation - When low crosses under LL
Few major changes in this version compared to previous ones:
Zigzag offers more simplicity in deriving the pattern and also enahnces accuracy. Things such as pivot distance, absolute peaks are removed as they are redundant.
Option to display risk per reward which defines how steep is the W-M triangle. This is simply the ratio of price difference between mid point to top most and bottom most points. In case of double top, downside is considered as reward and upside is considered as risk and with double bottom, downside is considered as risk and upside is considered as reward. Lower risk per reward signifies better trade.
Option to display stats which shows number of occurances of double top and bottom and how many times price crossed confirmation point and invalidation point (which are also marked with dashed lines) Stats are color coded. Higher success rates are colored in shades of green, lower success rates are colored in shades of orange whereas the neutral success rates are coloed in light yellow.
Example of stat shown in Neutral shade. I could not find any instrument which had confirmation rate less than 0.4 - which suggests confirmation rate for the patter is pretty strong:
Links for the other two scripts are here:
Double Top or Bottom
Double Top/Bottom V2This is an enhanced version of Double Top/Bottom detector.
Initial basic version can be found here:
Concept of deriving pattern is similar but there are few major changes.
Double Top:
Get the highest pivot high from last X pivot highs ( DTHigh1 )
Look for next top most pivot high which happened after DTHigh1 ( DTHigh2 )
Look for lowest pivot low between DTHigh1 and DTHigh2 ( DTLow )
Double Bottom:
Get the lowest pivot low from last X pivot lows ( DBLow1 )
Look for next lowest pivot low which happened after DBLow1 ( DBLow2 )
Look for highest pivot high between DBLow1 and DBLow2 ( DbHigh )
Other Key parameters:
checkForAbsolutePeaks and absolutePeakLoopback work together. When selected, double top and double bottom is formed only if DTHigh1 / DBLow1 are highest/lowest points from last absolutePeakLoopback bars back.
considerPivotDistance will make sure distance between Highs(in double top) and lows(in double bottom) are below 2 ( MaxAtrDistanceBase ) times ATR. And distance between average Highs/Lows to Low/High forming triangle is less than 6 ( MaxAtrDistanceHighLow ) times ATR. This will avoid showing steep triangles as double top/bottoms.
showLastLevels option allows users to display dashed lines on double top/bottom confirmation and invalidation levels for last formed double bottom and tops. These can be treated as strong support and resistence. Dashed lines are permanently formed on double top/bottom setups when an invalidation or confirmation occurs by price crossing either lowest or highest points of double top/bottom triangles.
Alerts:
Probable double top/bottom - when double top or bottom triangles formed.
Double top/bottom confirmation - when double top or bottom is confirmed.
Double top/bottom invalidation - when double top or bottom is invalidated.
Few important points about adjusting parameters:
Lower pivot lengths will generate more signals. But, too frequent signals may not be desirable as well.
higher absolutePeakLoopback will reduce number of signals while strengthening them.
Unchecking consider pivot distance or reducing MaxAtrDistanceBase/MaxAtrDistanceHighLow may considerably increase the number of pivots specially when pivot lengths are lower side. This may result in reduced quality of signals as well.
Moving average condition which is part of basic script is not included in this. We can add Hull Suite or moving average crossover on the chart as confirmation of strong signal.
Double Top/BottomHere is an attempt to identify double top/bottom based on pivot high/lows.
Logic is simple.
Double Bottom:
Last two pivot High Lows make W shape
Last Pivot Low is higher than previous Last Pivot Low.
Last Pivot High is lower than previous last Pivot High.
Price has not gone below Last Pivot Low
Price breaks out of last Pivot High to complete W shape
Double Top:
Last two pivot High Lows make M shape
Last Pivot Low is higher than previous Last Pivot Low.
Last Pivot High is lower than previous last Pivot High.
Price has not gone above Last Pivot High
Price breaks out of last Pivot Low to complete M shape
Prameters:
Parameters PvtLenL , PvtLenR and waitforclose determines pivot points.
FilterPivots clears repetitive pivots formed in same direction before calculating the possible double top/bottom.
For example:
CheckForAbsolutePeaks and AbsolutePeakLoopback works together. When CheckForAbsolutePeaks is enabled, script only generates double bottom or top signal if previous last pivot is absolute high or low for AbsolutePeakLoopback periods.
ConsiderMovingAverage does two things. First, it makes sure that fast moving average and slow moving averages are aligned with the direction we are going to forecast. Second, it makes sure that the crossover happend recently and with last BarCrossoverLimit bars. For example, to call it double bottom, Fast MA should be higher than Slow MA and crossover of FastMA above SlowMA should have happened in last 10 bars (BarCrossoverLimit)
PivotDisplayMode can be Actual, Filtered or None. Actual will display all pivot high low generated. Filtered will only display last 5 pivot high and pivot lows which are filtered . That means, it will remove the repetitive pivots formed without making pivots on the other side.
Welcome and suggestions and feedbacks.
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.
Fluffykats's Double Bottom indicator with alert v1This is a double bottom indicator with an alert that has many settings to customize your double bottom .
From Wikipedia "A double bottom is the end formation in a declining market. The pattern is formed by two price minima separated by local peak defining the neck line. The formation is completed and confirmed when the price rises above the neck line, indicating that further price rise is imminent or highly likely."
The following can be customized:
The left and right bar strengths for both the Right Top ( RT ) and Left Top ( LT ). For an explanation on RT / LT bar strength see (pivothigh) tradingview pine script API notes.
The price variance in % between RT / LT
The minimum and maximum allowable separation between RT / LT
Ability to toggle visibility of prices
PM us to obtain access
Best regards.
Double Top Double Bottom [MS]Automatic Double Top and Double Bottom pattern scanner for any time frame, any asset.
Simple to use, just add to your chart, and set the size (in the settings) for the patterns you want to find.
• Green patterns are bullish
• Red patterns are bearish
• Alerts are available for when new patterns are displayed
• When a pattern completes (at the neckline), it will change from dotted lines to solid lines.
To scan for multiple sizes of patterns, add the script to your chart multiple times.
Use the link below or PM us to obtain access to this indicator.
Fluffykat's Double Top indicator with alert v1This is a free double top indicator with an alert that has many settings to customize your double top.
From Wikipedia "The double top is a frequent price formation at the end of a bull market. It appears as two consecutive peaks of approximately the same price on a price-versus-time chart of a market. The two peaks are separated by a minimum in price, a valley. The price level of this minimum is called the neck line of the formation. The formation is completed and confirmed when the price falls below the neck line, indicating that further price decline is imminent or highly likely."
The following can be customized:
The left and right bar strengths for both the Right Top (RT) and Left Top (LT). For an explanation on RT/LT bar strength see (pivothigh) tradingview pine script API notes.
The price variance in % between RT / LT
The minimum and maximum allowable separation between RT/LT
Ability to toggle visibility of prices
Best regards.
Cyatophilum Double Top & Bottom [ALERTSETUP]Private Indicator
Version Alpha
The indicator is subject to changes.
This indicator's goal is to help automatically find double top and double bottom patterns.
Its core algorithm uses purely price action and does not use any kind of overbought/oversold oscilator.
To be validated, a double top/bottom must be preceded by a simple top/bottom.
Parallel Channels
To be validated, a double top/bottom must be inside the top/bottom parallel channel. Channels will expire after some time. A channel's range is automatically calculated when changing timeframe or symbol. Channels can be used to trade breakouts after a double top/bottom happened.
Alerts
This indicator allows to create automated alerts in order to receive signals for an event. The available alerts are:
Double Bottom
Double Top
Simple Bottom
Simple Top
Send me a message if you would like to help me test the indicator.
Double Top Pattern IdentifierHello friends,
This script is a powerful, non-repainting detector for the classic Double Top pattern — one of the most widely recognized bearish reversal setups. The indicator automatically identifies and tracks developing 'M'-shaped formations in real-time, confirming valid entries once the neckline is broken and providing complete trade management features. No manual configuration for detection is needed — it works out of the box.
🛠 How It Works
It uses advanced techniques that involve pivot points analysis and do not rely on other indicators, ensuring robustness and adaptability across different market conditions. When a potential Double Top is detected, the indicator marks the pattern points, draws the neckline, and waits for confirmation.
Once confirmed, it generates a 'Short' signal with calculated Take Profit (TP) and Stop Loss (SL) levels.
The script includes a statistics table summarizing performance metrics — such as number of patterns, trade results, bar distances, and top differences — all dynamically updated on your chart.
🔥 Key Features
Pine Script V6 — optimized logic and performance
Works out of the box — no manual configuration required
Non-repainting detection
Fully visualized structure — points, neckline, TP, and SL plotted automatically
Multiple TP/SL modes: R/R ratio, ATR-based, percent, points, pips, ticks, or top-to-neckline distance
Trailing Stop Loss support
Interactive statistics table with pattern count, trade outcomes, profit ratio, and structural measurements
Smart alert system
Customizable alert messages with placeholders (price, ticker, timeframe, etc.)
Clean, updated UI with improved layout and organization
If you'd like access or have any questions, feel free to reach out to me directly via DM.
👋 Good luck and happy trading!
Paid script
Double Bottom Pattern IdentifierHello friends,
This script is a powerful, non-repainting detector for the classic Double Bottom pattern — one of the most widely recognized bullish reversal setups. The indicator automatically identifies and tracks developing 'W'-shaped formations in real time, confirming valid entries once the neckline is broken and providing complete trade management features. No manual configuration is needed — it works right out of the box.
🛠 How It Works
It uses advanced techniques involving pivot point analysis and does not rely on other indicators, ensuring robustness and adaptability across different market conditions. When a potential Double Bottom is detected, the indicator marks the pattern points, draws the neckline, and waits for confirmation.
Once confirmed, it generates a 'Long' signal with calculated Take Profit (TP) and Stop Loss (SL) levels.
The script also includes a statistics table summarizing performance metrics — such as the number of patterns, trade results, bar distances, and bottom differences — all dynamically updated on your chart.
🔥 Key Features
Pine Script V6 — optimized logic and performance
Works right out of the box — no setup required
Non-repainting detection
Fully visualized structure — points, neckline, TP, and SL plotted automatically
Multiple TP/SL modes: R/R ratio, ATR-based, percent, points, pips, ticks, or bottom-to-neckline distance
Trailing Stop Loss support
Interactive statistics table with pattern count, trade outcomes, profit ratio, and structural measurements
Smart alert system
Customizable alert messages with placeholders (price, ticker, timeframe, etc.)
Clean, updated UI with improved layout and organization
If you'd like access or have any questions, feel free to reach out to me directly via DM.
👋 Good luck and happy trading!
Paid script
Dav-o meter (public)I decided to make this formerly invite only script public (you can find the invite only version here
If you are part of the invite only you don't need to change scripts. I will push improvements first on the invite only script but in time it will come to this version as well.
I would love to know your ideas and thoughts on how this indicator can be improved, so feel free to give any feedback.
Remember to give it a thumbs up if you like it.
Triple Bollinger BandsI found myself using multiple bollinger bands a lot so I decided to add them all to one script and add the ability to adjust them by 0.2. It has helped me by not taking up as much space in the upper left corner as well as improving my in's and outs of trend continuation trades. If you manage to find a double top at +2 or greater deviation, and with a bearish divergence on the RSI as shown in this picture, GO SHORT SON! This was a fast and easy 35 - 40 pips and if you used your fibonacci for an exit you had little doubt of the final result and could have even been prepared for an immediate reversal knowing you were then at an oversold -2.8 deviation. I could go on and on........











