Chart Patterns [ActiveQuants]The Chart Patterns indicator is a comprehensive tool designed to automatically identify a variety of common chart patterns directly on your price chart. By detecting sequences of pivot highs and lows , this indicator helps traders spot potential trend continuations , reversals , and key market structures such as Double Tops and Double Bottoms . Enhance your technical analysis by quickly recognizing these formations as they emerge.
How It Works
The indicator operates in a two-stage process:
Pivot Point Detection: It first identifies significant swing highs and swing lows (pivot points) based on a user-defined Period . These pivots form the fundamental building blocks for pattern recognition.
Pattern Recognition: Using the sequence of these detected pivot points, the script then applies logical rules to identify the following patterns:
Lower Low (LL)
Lower Low & Lower High (LL & LH)
Higher High (HH)
Higher High & Higher Low (HH & HL)
Double Tops
Double Bottoms
Patterns are drawn on the chart with connecting lines and labeled for easy identification. Double Tops and Double Bottoms also feature a status system: " Active " while forming, " Confirmed " upon neckline breakout, or " Invalid " if specific conditions negate the pattern before confirmation.
█ KEY FEATURES
Comprehensive Pattern Detection: Identifies six distinct types of chart patterns, offering insights into both trend continuation and potential reversals.
Pivot-Based Analysis: Uses a robust method of identifying pivot highs and lows as the foundation for pattern formation.
Pattern Status for Double Tops/Bottoms:
- Active: A Double Top or Double Bottom pattern has formed its two peaks/troughs and the intervening neckline point, but the price has not yet broken beyond the neckline. The pattern is developing .
- Confirmed: The price has decisively closed beyond the neckline (below for Double Top, above for Double Bottom), signaling a potential entry or validation of the pattern.
- Invalid: An " Active " Double Top or Double Bottom pattern can be invalidated if, before a neckline breakout occurs, a new pivot point forms that negates the pattern’s structural integrity. For example, if a new pivot low forms above or at the neckline of an Active Double Top, the pattern is considered invalid because the market failed to break down and instead showed relative strength.
Customizable Visuals: Allows users to define colors for bullish and bearish patterns, line widths, and the visibility of pivot points.
Selective Pattern Display: Users can choose to display all patterns or filter by status (Active, Confirmed, Invalid) for Double Tops/Bottoms. Individual pattern types can also be toggled on or off.
Historical Analysis Control: The Show Last History (Bars) input allows users to specify how far back the indicator should plot patterns, optimizing performance and chart readability.
Clear Labeling: Patterns are clearly labeled on the chart, with Double Tops/Bottoms also showing " Top 1 ," " Top 2 ," or " Bottom 1 ," " Bottom 2 " labels.
█ PATTERNS DETECTED
Lower Low (LL): Indicates a potential bearish continuation or the start of a downtrend. Forms when price makes a lower low during an uptrend.
Lower Low & Lower High (LL & LH): A stronger confirmation of a bearish trend, where the market forms a lower low followed by a lower high .
Higher High (HH): Signals a potential bullish continuation or the start of an uptrend. Forms when price makes a higher high during a downtrend.
Higher High & Higher Low (HH & HL): A stronger confirmation of a bullish trend, where the market forms a higher high followed by a higher low .
Double Top: A bearish reversal pattern characterized by two distinct peaks at roughly the same price level, separated by a trough (neckline). Confirmation occurs when price breaks below the neckline.
Double Bottom: A bullish reversal pattern featuring two distinct troughs at roughly the same price level, separated by a peak (neckline). Confirmation occurs when price breaks above the neckline.
█ EXAMPLE: DOUBLE TOP INVALIDATION
Understanding how a Double Top or Double Bottom can be invalidated is crucial. Here's an example for a Double Top:
Formation: The indicator identifies two peaks (Top 1, Top 2) at a similar price level, with a corrective trough (Neckline Pivot P5) in between. The pattern is labeled " Double Top " and is in an " Active " state. ( Imagine points P4 and P6 are the two tops, and P5 is the low point of the neckline between them ).
Pre-Breakout Condition: The price action continues, but before it breaks decisively below the P5 neckline level, a new significant swing low (a new pivot low) forms.
Invalidation Check: The indicator checks the price level of this new pivot low. If this new pivot low occurs at a price equal to or higher than the P5 neckline level, the " Active " Double Top pattern is re-labeled as " Invalid Double Top ". ( See image below for a visual representation of this scenario )
In this example, the Double Top formed with Top 1 (P4) and Top 2 (P6). The neckline is at P5. Before price broke below P5, a new pivot low formed at the red circle. Since this new pivot low is above the P5 neckline, the Double Top is marked " Invalid ".
The logic is that the market failed to break the neckline support and instead established a higher low (or a low at the support level), suggesting that the immediate bearish pressure has waned, thus invalidating the bearish reversal implication of the Double Top before it could confirm. A similar logic applies to Double Bottoms (a new pivot high forming below or at the neckline before an upside breakout).
█ USER INPUTS
Visibility and Common Styling
- Show Last History (Bars):
Specifies the number of recent bars the indicator will analyze and plot patterns on.
Default: 3000 bars. Min: 10.
- Patterns:
Filters which patterns are displayed based on their status.
Options: All, Active, Confirmed, Invalid.
Default: All.
- Pattern Line Width:
Sets the thickness of the lines used to draw the patterns.
Default: 1. Min: 1, Max: 10.
- Bearish Color:
Color for bearish patterns (LL, LL & LH, Double Tops).
Default: Red.
- Bullish Color:
Color for bullish patterns (HH, HH & HL, Double Bottoms).
Default: Green.
Pivot Points
- Period:
The lookback period on either side of a bar to qualify it as a pivot high or low. Higher values detect more significant pivots.
Default: 10 bars. Min: 2.
- Show Pivot Highs:
Toggles the visibility of detected pivot high markers.
Default: Enabled.
- Show Pivot Lows:
Toggles the visibility of detected pivot low markers.
Default: Enabled.
- Pivot Highs Color:
Color for the pivot high markers.
Default: #ff5252 (Reddish).
- Pivot Lows Color:
Color for the pivot low markers.
Default: #089981 (Greenish).
Patterns (Toggles)
- Lower Low:
Enable/disable detection and display of Lower Low patterns.
Default: Enabled.
- Lower Low & Lower High:
Enable/disable detection and display of Lower Low & Lower High patterns.
Default: Enabled.
- Higher High:
Enable/disable detection and display of Higher High patterns.
Default: Enabled.
- Higher High & Higher Low:
Enable/disable detection and display of Higher High & Higher Low patterns.
Default: Enabled.
- Double Tops:
Enable/disable detection and display of Double Top patterns.
Default: Enabled.
- Double Bottoms:
Enable/disable detection and display of Double Bottom patterns.
Default: Enabled.
█ CONCLUSION
The Chart Patterns indicator is a versatile and powerful assistant for traders who utilize classical chart pattern analysis. By automating the detection of key formations and providing clear visual cues along with status updates for patterns like Double Tops and Bottoms, it allows traders to focus on strategy development and execution. With its customizable settings, it can be adapted to various instruments and timeframes, making it a valuable addition to any technical trader's toolkit.
█ IMPORTANT NOTES
⚠ Pivot Period Sensitivity: The Period setting for pivot detection is crucial. A shorter period will identify more frequent, smaller swings, while a longer period will focus on more significant turning points. Adjust this setting based on the asset's volatility, the timeframe you are trading and your trading style.
⚠ Confirmation is Key: While the indicator identifies patterns, always wait for pattern confirmation (e.g., neckline breaks for Double Tops/Bottoms) and consider other factors like volume and market context before making trading decisions.
⚠ Confirmed Bars for Detection: Patterns are identified based on confirmed pivot points, which means a pivot is recognized period bars after it has formed. Status updates for Double Tops/Bottoms (Active, Confirmed, Invalid) also occur on confirmed bars. This approach enhances reliability and reduces the likelihood of repainting based on intra-bar price fluctuations.
⚠ Not a Standalone System: Chart patterns provide valuable insights, but they should be used in conjunction with other technical analysis tools (e.g., trendlines, moving averages, oscillators) and a sound risk management plan.
⚠ Lagging Nature: By their very definition, chart patterns are lagging indicators as they require a sequence of price action and several pivot points to complete their formation.
█ RISK DISCLAIMER
Trading involves a substantial risk of loss and is not suitable for every investor. The information provided by the Chart Patterns indicator is for educational and informational purposes only. It should not be considered as financial advice or a recommendation to buy or sell any security. Chart patterns indicate potential price movements but do not guarantee future results. Always perform your own due diligence and consult with a qualified financial advisor before making any investment decisions. Past performance is not indicative of future results.
📈 Happy trading! 🚀
雙頂
Chart Patterns (PRO) [ActiveQuants]Unlock the full potential of chart pattern trading with Chart Patterns (PRO) ! This advanced indicator goes beyond basic detection, offering a comprehensive suite of tools for serious traders. Automatically identify an extensive range of reversal and continuation patterns, complete with projected price targets , visually appealing pattern fills , and a sophisticated multi-status alert system .
How It Works
The indicator employs a sophisticated multi-stage process:
Precision Pivot Detection: At its heart, the indicator identifies significant swing highs and lows (pivot points) using an optimized internal period. These pivots are the fundamental building blocks for all pattern recognition. ( Users can toggle visibility of these pivots ).
Advanced Pattern Recognition Engine: Sequences of these pivot points are meticulously analyzed against a vast library of predefined geometric conditions to identify chart patterns. This includes checks for relative pivot heights/lows, slope analysis of trendlines, and ATR-based proportionality for patterns like Head & Shoulders.
Dynamic Status Tracking & Invalidation:
- Active: A pattern's initial structure is identified (e.g., two tops of a Double Top, or the converging trendlines of a Pennant). The pattern is developing.
- Confirmed: The pattern completes, and price breaks out/down from a key level (e.g., neckline, trendline) in the expected direction. Price targets are plotted upon confirmation.
- Invalidated: If price breaks out/down in the opposite direction of what's expected for an "Active" pattern, or if a new pivot forms that structurally compromises an "Active" Double Top/Bottom or Head & Shoulders before its confirmation, the pattern is marked "Invalid".
Price Target Projection: For confirmed patterns (excluding simple HH/LL structures), the indicator automatically calculates and plots potential price targets based on common technical analysis principles (e.g., pattern height projected from the breakout point).
█ DETECTED CHART PATTERNS
Chart Patterns (PRO) identifies a comprehensive list of 20 patterns, categorized for clarity:
I. Simple Market Structures:
Lower Low (LL): Indicates bearish pressure, potentially forming part of a larger downtrend.
Lower Low & Lower High (LL & LH): Stronger confirmation of a bearish trend.
Higher High (HH): Signals bullish strength, potentially part of an uptrend.
Higher High & Higher Low (HH & HL): Stronger confirmation of a bullish trend.
II. Reversal Patterns:
These patterns typically signal a potential end of the current trend and the beginning of a new one in the opposite direction.
Double Top (DT): Bearish reversal. Two distinct peaks at similar levels.
Double Bottom (DB): Bullish reversal. Two distinct troughs at similar levels.
Head and Shoulders (H&S): Bearish reversal. A central peak (head) flanked by two smaller peaks (shoulders).
Inverse Head and Shoulders (Inv H&S): Bullish reversal. A central trough (head) flanked by two smaller troughs (shoulders).
Rising Wedge From Uptrend (RW From UT): Bearish reversal. Converging trendlines with an upward slant during an uptrend.
Falling Wedge From Downtrend (FW From DT): Bullish reversal. Converging trendlines with a downward slant during a downtrend.
Bearish Ascending Triangle (Reversal): Bearish reversal. A horizontal resistance line with rising support, typically occurring after a downtrend.
Bullish Descending Triangle (Reversal): Bullish reversal. A horizontal support line with falling resistance, typically occurring after an uptrend.
III. Continuation Patterns:
These patterns typically suggest a temporary pause in the prevailing trend, after which the trend is likely to resume.
Rising Wedge From Downtrend (RW From DT): Bearish continuation. An upward-slanted consolidation during a downtrend.
Falling Wedge From Uptrend (FW From UT): Bullish continuation. A downward-slanted consolidation during an uptrend.
Bearish Pennant: Bearish continuation. A small symmetrical triangle (converging trendlines) after a sharp downward move.
Bullish Pennant: Bullish continuation. A small symmetrical triangle (converging trendlines) after a sharp upward move.
Bearish Flag: Bearish continuation. A short, rectangular consolidation (parallel trendlines, often upward sloping) after a sharp downward move.
Bullish Flag: Bullish continuation. A short, rectangular consolidation (parallel trendlines, often downward sloping) after a sharp upward move.
Bearish Descending Triangle: Bearish continuation. Horizontal support and a descending resistance line during a downtrend.
Bullish Ascending Triangle: Bullish continuation. Horizontal resistance and an ascending support line during an uptrend.
█ KEY FEATURES
- Automatic Price Target Projection:
Once a pattern is "Confirmed," a price target is automatically plotted on the chart.
Targets are calculated based on established technical methods, typically measuring the height of the pattern and projecting it from the breakout point.
Includes a label displaying the target price level. Toggle with Show Price Targets .
- Advanced Multi-Status Alerts:
Never miss an opportunity with highly configurable alerts.
Receive notifications when a pattern is:
- Developing (Active): Get an early heads-up.
- Confirmed: Act on breakout signals.
- Invalidated: Re-assess your strategy quickly.
Alerts automatically include the pattern type and its status (e.g., "Double Top - Confirmed ✅").
Additional contextual information included by default: Ticker Symbol, Chart Timeframe, Current Price, and Projected Target Price (for confirmed patterns).
Enable/disable all alerts via the Enable Alerts setting.
- Comprehensive Pattern Validation & Invalidation:
Patterns like Wedges, Triangles, Pennants, and Flags are monitored for breakouts. A breakout in the expected direction confirms the pattern; a breakout in the opposite direction invalidates it.
Double Tops/Bottoms and Head & Shoulders have pre-confirmation invalidation logic: if a new pivot forms that compromises the pattern's structure before the neckline breaks, the pattern is marked "Invalid". This helps filter out weaker setups.
ATR is used internally for proportional checks in patterns like Head & Shoulders, ensuring more reliable formations.
- Superior Visualizations:
Pattern Fills: Wedges, Triangles, Pennants, and Flags are visually enhanced with a semi-transparent fill between their trendlines, making them easy to spot.
Clear Necklines & Trendlines: Critical lines for patterns are drawn clearly.
Distinct Labels: Each pattern receives a main label (e.g., "H&S", "BullP"). Double Tops/Bottoms and H&S also get individual component labels (Top 1/2, Shoulder 1/Head/Shoulder 2).
Customizable Colors: Set distinct colors for bullish and bearish patterns.
- Pattern Display Control:
Toggle visibility for each of the 20 individual pattern types.
Filter displayed patterns by their status: All , Active , Confirmed , or Invalid .
Control historical depth with Show Last History (Bars) .
- Pivot Point Engine:
The indicator uses an optimized internal lookback period for robust pivot detection.
Optionally display these pivot high and low markers on your chart, with customizable colors.
█ USER INPUTS
Visibility and Common Styling
- Show Last History (Bars):
Number of recent bars the indicator will analyze and plot patterns on.
Default: 3000. Min: 10.
- Patterns (Visibility Filter):
Filters displayed patterns based on their status.
Options: All, Active, Confirmed, Invalid.
Default: All.
- Show Price Targets:
Toggles the display of calculated price targets for confirmed patterns.
Default: Enabled.
- Bearish Color:
Sets the color for bearish patterns and their components.
Default: Red.
- Bullish Color:
Sets the color for bullish patterns and their components.
Default: Green.
Pivot Points
- Show Pivot Highs:
Toggles the visibility of detected pivot high markers.
Default: Enabled.
- Show Pivot Lows:
Toggles the visibility of detected pivot low markers.
Default: Enabled.
- Pivot Highs Color:
Color for pivot high markers.
Default: #ff5252 (Reddish).
- Pivot Lows Color:
Color for pivot low markers.
Default: #089981 (Greenish).
Pattern Toggles (Grouped by Type)
- Simple Structures:
Lower Low (Default: Enabled)
Lower Low & Lower High (Default: Enabled)
Higher High (Default: Enabled)
Higher High & Higher Low (Default: Enabled)
- Reversal Patterns:
Double Tops (Default: Enabled)
Double Bottoms (Default: Enabled)
Head and Shoulders (Default: Enabled)
Inverse Head and Shoulders (Default: Enabled)
Rising Wedges From Uptrend (Default: Enabled)
Falling Wedges From Downtrend (Default: Enabled)
Bearish Ascending Triangles (Reversal context) (Default: Enabled)
Bullish Descending Triangles (Reversal context) (Default: Enabled)
- Continuation Patterns:
Rising Wedges From Downtrend (Default: Enabled)
Falling Wedges From Uptrend (Default: Enabled)
Bearish Pennants (Default: Enabled)
Bullish Pennants (Default: Enabled)
Bearish Flags (Default: Enabled)
Bullish Flags (Default: Enabled)
Bearish Descending Triangles (Continuation context) (Default: Enabled)
Bullish Ascending Triangles (Continuation context) (Default: Enabled)
Alerts
- Enable Alerts:
Master switch to enable or disable all alert notifications from this indicator.
Default: Enabled. ( Alert messages are pre-configured to include Pattern Type, Status, Symbol, Timeframe, Price, and Target Price when applicable and confirmed ).
█ UNDERSTANDING PATTERN INVALIDATION
Trendline Patterns (Wedges, Triangles, Pennants, Flags): An "Active" pattern is invalidated if price breaks its trendlines in the direction opposite to the expected breakout before a confirmation occurs. E.g., an Active Bullish Pennant is invalidated if price breaks below its lower trendline.
Neckline Patterns (Double Tops/Bottoms, H&S): An "Active" pattern can be invalidated before a neckline break if a new pivot point forms that violates the pattern's structural integrity.
Example (Double Top): If Top 1, Neckline (P5), and Top 2 form (Active status), but before price breaks below P5, a new swing low forms at or above P5, the Double Top is invalidated. This indicates a failure to break support and potential renewed strength.
█ ALERTS GUIDE
Add the " Chart Patterns (PRO) " indicator to your chart.
Ensure Enable Alerts is checked in the indicator settings.
In TradingView, click the "Alert" icon (clock) in the right toolbar or press ALT + A .
In the "Create Alert" dialog:
- Condition: Select " Chart Patterns (PRO) ".
- For the condition dropdown below it, choose " Any alert() function call ". This will trigger for any alert generated by the script.
- Interval: Choose whatever interval you want the alert to be triggered.
- Expiration: Choose the expiration date.
Customize your alert notification preferences (popup, email, webhook, etc.) and click " Create ".
You will now receive alerts for pattern status changes (Developing, Confirmed, Invalidated) with detailed information.
█ CONCLUSION
The Chart Patterns (PRO) indicator is an indispensable tool for traders aiming to optimize their workflow. By automatically identifying and drawing classical chart patterns, it eliminates the need for manual chart analysis, thereby enabling users to dedicate substantially less time to chart monitoring. Its comprehensive detection, coupled with actionable insights like price targets and a meticulous status tracking system with alerts, provides a significant analytical edge. Automate your pattern recognition and drawing, and concentrate on making informed trading decisions with enhanced efficiency.
█ IMPORTANT NOTES
⚠ Confirmation is Crucial: While "Active" patterns provide early warnings, always await "Confirmed" status (e.g., neckline/trendline breaks) and consider volume and broader market context.
⚠ Non-Repainting Logic: Pattern detection and status updates are based on confirmed price bars and pivot points. Once a pattern is fully formed and its status set (Active, Confirmed, Invalid), it will not repaint its historical state. Initial drawing of "Active" patterns extends to the current bar and updates dynamically.
⚠ Combine with Other Tools: No indicator is a standalone solution. Use Chart Patterns (PRO) in conjunction with other forms of analysis (e.g., fundamental analysis, other indicators, volume analysis) and robust risk management .
⚠ Historical Data: Ensure sufficient historical data on your chart for patterns to form and be detected accurately. The Show Last History (Bars) setting can manage this.
⚠ Lagging Nature: By their very definition, chart patterns are lagging indicators as they require a sequence of price action and several pivot points to complete their formation.
█ RISK DISCLAIMER
Trading involves substantial risk of loss and is not suitable for all investors. The Chart Patterns (PRO) indicator and its generated information are for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any security. Chart patterns and projected targets indicate potential price movements based on historical tendencies but do not guarantee future results. Always conduct your own due diligence, consider multiple factors, and consult with a qualified financial advisor before making investment decisions. Past performance is not indicative of future results.
📈 Happy trading! 🚀
Doji Double Top & Double Bottom
FUNCTION :
This indicator checks if 2 consecutive candlesticks are formed in such a way that both the lows or both the highs of the consecutive candlesticks are almost at the same level and either of them is a doji
TIMEFRAMES :
it works on daily, weekly, monthly and higher timeframes
CRITERIA :
There is maximum difference value between 2 consecutive candlesticks' lows or 2 consecutive candlesticks' highs
Minimum value of the doji's wick size
Maximum value of the doji's body size
These 3 conditions need to be fulfilled for the 2 consecutive candlesticks to be considered as a Double top or Double bottom by this indicator
EXAMPLES :
Here the indicator is giving only double Bottom signals on CRUDE OIL chart
Here the indicator is giving only double top signals on GOLD chart
Here the indicator gives both double top & double bottom signals on EUR/USD Daily chart
Here the indicator is giving both double top & double bottom signals on EUR/USD Half-Yearly chart
DEFINITIONS :
There are 2 types -
DOJI DOUBLE BOTTOM - if the lows of 2 consecutive candlesticks are almost at the same level & either of them is doji then it is called Double Bottom and market is supposed to go higher after forming it.
DOJI DOUBLE TOP - if the highs of 2 consecutive candlesticks are almost at the same level & either of them is doji then it is called Double Top and market is supposed to go lower after forming it.
SETTINGS :
There are options to change the value of each of the 3 parameters within the indicator's settings for daily, weekly & monthly chart [
LIMITATIONS :
You should not trade based on the signals from this indicator solely, you should check other parameters too before making trading decision
Double Top/Bottom [AlgoAlpha]Introducing the Double Top/Bottom Indicator by AlgoAlpha, a powerful tool designed to identify key reversal patterns in the market with precision. This indicator meticulously detects double tops and double bottoms, helping traders recognize potential trend reversals and make informed trading decisions.
Key Features:
🔍 Pattern Detection : Accurately identifies double top and double bottom formations based on customizable time horizons.
🎨 Customizable Appearance : Choose your preferred colors for bullish and bearish trends to match your trading style.
📊 Signal Labels : Option to display only the second pivot of the double top/bottom for a cleaner chart view.
🔧 Flexible Settings : Adjust the time horizon to control the look-back period, allowing for detection of both short-term and long-term patterns.
📈 Visual Enhancements : Draws trend lines and fills between pivotal points to visually highlight potential reversal zones.
🔔 Alerts : Set up alerts for potential double top and double bottom formations to stay informed of key market movements.
How to Use the Double Top/Bottom Indicator :
🛠 Add the Indicator : Simply add the Double Top/Bottom Indicator to your TradingView chart from your favorites. Customize the time horizon and appearance settings to fit your trading preferences.
📊 Analyze Patterns : Watch for the identified double top and double bottom patterns along with the corresponding trend lines and filled areas to anticipate potential market reversals.
🔔 Set Alerts : Enable alerts to receive notifications when double top or double bottom patterns are detected, ensuring you never miss a critical trading opportunity.
How It Works : The indicator scans the price action for pivot highs and lows within a specified time horizon, identifying potential double top and double bottom patterns. It maintains a sequence of these pivots and verifies the formation of these patterns based on the relationship between consecutive pivots and the proximity to a defined limit. When a double top or double bottom is confirmed, the indicator marks the second pivot point with a label and draws trend lines to visualize the reversal pattern. Additionally, it provides alert conditions to notify traders of potential confirmations, enhancing decision-making without cluttering the chart.
⚠️ Important Reminder : The labels indicating double tops and bottoms appear with a delay and are intended to mark the formations after they have already formed. They are not meant to be used as real-time trading signals. While they align perfectly with pivot points in hindsight, please use them as markers for analysis rather than immediate trading triggers.
Double Tops/Bottoms [UAlgo]🔶Description:
The "Double Tops/Bottoms " indicator is designed to identify potential double tops and double bottoms on price charts. These patterns are often considered significant as they may indicate a reversal in the prevailing trend. The indicator can be applied to both high/low and close price data, offering flexibility in analyzing different aspects of market behavior.
🔶Key Features:
Source Selection: Users can choose between using high/low or close prices as the basis for identifying double tops and bottoms, allowing for tailored analysis based on specific price actions.
Lookback Length: The indicator offers a customizable lookback length, enabling users to adjust the sensitivity of pattern detection according to their trading preferences and timeframes.
Pivot Length: Users can specify the length of the pivot used in identifying double tops and bottoms, providing flexibility in capturing different market dynamics.
Minimum Bar Count Between Tops/Bottoms: A minimum bar count parameter allows users to control the distance between consecutive tops or bottoms, enhancing the accuracy of pattern recognition.
Pivot Tops/Bottoms Only: The indicator offers the option to focus exclusively on pivot tops and bottoms, streamlining the analysis process for users interested specifically in these key reversal points.
Disclaimer:
Trading involves substantial risk and is not suitable for every investor. The indicator provided here is intended for informational purposes only and should not be construed as investment advice or a recommendation to buy, sell, or hold any securities. Users are solely responsible for evaluating their own investment decisions and should seek professional financial advice if needed. The creator of this indicator (UAlgo) does not guarantee the accuracy, completeness, or reliability of the information provided, and shall not be liable for any losses incurred in connection with its use. By using this indicator, users acknowledge and agree to assume all risks associated with trading activities.
Double Tops & Bottoms [QuantVue]This indicator is designed to detect and plot Double Tops and Double Bottoms, by setting the initial high or low using standard pivot points.
Double Tops
A Double Top is a bearish reversal pattern, typically found when an uptrend returns back to a prior peak. It signifies a potential turning point or resistance level and could potentially reverse in direction.
The pattern is confirmed as a Double Top when the price breaks above the resistance level, but closes below it. A decisive close below this level is seen as a confirmation of the bearish trend.
Double Bottoms
A Double Bottom, on the other hand, is a bullish reversal pattern typically found after a downtrend. It signals a potential turning point or support level where the price has bottomed and could potentially reverse upwards.
The pattern is confirmed as a Double Bottom when the price breaks below the support level, but closes above it. A decisive close above this level is viewed as a confirmation of the bullish trend.
Indicator Features
🔹Double Top Detection: When a double top is identified, a downward-pointing triangle will be plotted above the bar, and if the alerts are enabled, a notification will be triggered.
🔹Double Bottom Detection: When a double bottom is identified, an upward-pointing triangle will be plotted below the bar, and if the alerts are enabled, a notification will be triggered.
🔹Pivot Lookback: Defines the number of bars to the left and right of the pivot that must be lower/higher to qualify as a pivot.
🔹Maximum Length Between Tops/Bottoms: Maximum number of bars between two tops/bottoms to be considered a double top or bottom.
🔹Style Settings: Allows the user to customize the appearance of the lines indicating the tops/bottoms. Options include color selection, line style (dotted, dashed, or solid), and line thickness.
🔹Alerts: The user can enable or disable alerts for Double Top and Double Bottom.
Give this indicator a BOOST and COMMENT your thoughts!
We hope you enjoy.
Cheers!
Recursive Reversal Chart Patterns [Trendoscope]Caution: This algorithm is very heavy and bound to cause timeouts. If that happens, there are few settings you can change to reduce the load. (Will explain them in the description below)
🎲 Recursive Reversal Chart Patterns Indicator
Welcome to another exploration of Zigzag and Pattern ecosystem components. Previously we derived Pitchfork and Recursive Zigzag indicators. This indicator is designed to scan and highlight few popular "Reversal Chart Patterns". Similar to other indicators in the ecosystem, this too is built on recursive zigzags.
Double Taps
Triple Taps
Cup and Handles
Head and Shoulders
Indicator however names the patterns separately for bullish and bearish formations. So, the actual names you see on the screen are
Double Top
Double Bottom
Triple Top
Triple Bottom
Cup and Handle
Inverted Cup and Handle
Head and Shoulders
Inverse Head and Shoulders
Here is a snapshot on how each category of patterns look on the chart.
🎲 Architecture
Many of you may be cursing me for publishing too many libraries. But, these are all preparations for something big. Like other indicators in the Zigzag and Patterns Ecosystem, this too uses a bunch of libraries.
🎯Major direct dependencies
ZigzagTypes
ZigzagMethods
ReversalChartPatternLibrary
🎯Indirect dependencies
DrawingTypes
DrawingMethods
🎯Minor dependencies
Utils
TradeTracker
🎲 Indicator Settings
🎯Generic and Zigzag Settings.
Note: In case of timeout, please decrease the value of depth parameter
🎯Pattern Selection
Having all the patterns selected on chart may also cause timeouts and will make the chart look messy. It is better to limit one or two patterns on the chart to have clear picture.
🎯Scanner Settings
🎯Indicators.
These are options to use indicators as secondary confirmation to calculate divergence. If selected, the patterns are shown only if the divergence data is inline. Option also available to plugin external indicator. These calculations are not straightforward and not easy to measure by manual inspection. This feature at present is purely experimental.
Have a go and let me know how you feel :)
Double top and double bottomThis script identifies double top and double bottom chart patterns
It has many settings. For example, 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 .
The Sensitivity parameter will allow you to control the frequency of detected patterns , depending on whether you want the patterns to be detected more often, or if they cover a larger number of candles and thus be more reliable.
There are also several settings which you can determine the parameters of the pattern - the length and proportions of the lines included in it .
You can also customize your styles.
All key settings are accompanied by tooltips
Pro Trading Art - Double Top & Bottom with alertThis indicator is based on ta.pivothigh and ta.pivotlow function. And with the help of different ph and pl I am detecting double top and double bottom.
Features
1. All signal are on realtime means no repaint
2. Able to detect precise double top & bottom
Input Field
Pivot Length : Default 10 => Use to detect pivot point
V Bottom & V Top Pattern [Misu]█ This indicator shows V bottom & V top patterns as well as potential V bottom & V top.
These V bottom & V top are chart powerful reversal patterns.
They appear in all markets and time-frames, but due to the nature of the aggressive moves that take place when a market reverses direction, it can be difficult to identify this pattern in real-time.
To address this problem, I added potential V pattern as well as the confirmed one.
█ Usages:
You can use V top & V bottoms for reversal zones.
You can use it for scalping strategies, as a main buy & sell signal.
Potential V patterns can be used to anticipate the market, in addition to volatility or momentum indicators, for example.
█ How it works?
This indicator uses pivot points to determine potential V patterns and confirm them.
Paramaters are available to filter breakouts of varying strengths.
Patterns also have a "max number bars" to be validated.
█ Why a Strategy type indicator?
Due to the many different parameters, this indicator is a strategy type.
This way you can overview the best settings depending on your pair & timeframe.
Parameters are available to filter.
█ Parameters:
Deviation: Parameter used to calculate parameters.
Depth: Parameter used to calculate parameters.
Confirmation Type: Type of signal used to confirme the pattern.
> Mid Pivot: pattern will confirm on mid pivot breakout.
> Opposit Pivot: pattern will confirm on opposit pivot breakout.
> No confirmation: no confirmation.
Lenght Avg Body: Lenght used to calculate the average body size.
First Breakout Factor: This factor multiplied by the "body avg" filters out the non-significant breakout of potential V pattern.
Confirmation Breakout Factor: This factor multiplied by the "body avg" filters out the non-significant breakout for the confirmation.
Max Bars Confirmation: The maximum number of bars needed to validate the pattern.
Price action: Double top/bottom StrategyDouble top and bottom patterns are chart patterns that occur when the underlying investment moves in a similar pattern to the letter "W" (double bottom) or "M" (double top).
In this strategy, I use Pivot High/Low to find Double top and bottom.
Entry long: when Double bottom occur.
Entry short: when Double top occur.
Risk: Reward: You can change % Stop loss and Target pfofit.
Genie (AB=CD Fibonacci Extensions and Peaks & Valleys)Our proprietary algorithm supports two types of Signals to choose from (and uses Matrices to keep track of the various waves): 'Fibonacci Extensions' where it spots extended waves (XABC) to predict AB=CD moves and puts the Take Profit levels accordingly to commonly used Fibonacci ratios; OR 'P&V' which stands for Peaks & Valleys (M and W) capturing full Peaks and Valleys formations to signal.
Signal Trigger for two types of positions: Breakout or Confirmation when price retraces back to them (so you wait for a candle to close away from price first to Trigger). The idea is whenever a proper Peak or Valley matching those conditions is printed, price usually reacts at those levels by doing a Reversal, so they represent potential entries .
For Confirmation signals, you want price to close away from the level first to then return to it, and that candle close is either a Close (only the close should be outside the level), Hard Close (OPEN and CLOSE outside the level) or Full Close (HIGH, OPEN, CLOSE, LOW all outside the level).
Note that the Signal is to be taken as soon as a Green or Red arrow appears (not before), based on your desired settings.
The Level of Entry is decided by the user; 'Extreme' means you want the algorithm to process based on the Wicks/Pins (Highs and Lows of candles) so while 'Body' means the Borders (Open and Close of candles). Based on this choice the Signal will change accordingly.
The indicator also provides recommended Take Profit levels as well as a Stop Loss levels. The Take Profits are measured based on the wave structure formation.
All features are configurable from the indicator's settings including setting Minimum Take Profit and Reward:Risk (RR) to filter Signals.
This indicator has Alerts for LONG and SHORT signals. You can create a new Alert, select the indicator from the "Condition" list and create it. You can create an Alert for each different timeframe if you want the indicator to monitor various timeframes and give you Alerts accordingly.
Double Top/Bottom - Ultimate (OS)This is zigzag based double top/bottom indicator. Code is same as : Double-Top-Bottom-Ultimate
But, republishing it to make it available open source.
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 input options:
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 confirmation rates are colored in shades of green, lower confirmation rates are colored in shades of orange whereas the neutral confirmation rates are coloed in light yellow.
Auto Harmonic Patterns - Open SourceI may not be able to spend much time on the harmonic patterns and realized that there are not much open source scripts on them either. Hence, decided to release open source version which can be used by other developers for reference and build things on top of it.
Original script is protected and can be found here:
Logical ratios of patterns are coded as below:
Notations:
Lines XABCD forms the pattern in all cases. (OXABCD in case of Three drives )
abc = BC retacement of AB, xab = AB retracement of XA and so on
ABCD Classic
0.618 <= abc <= 0.786
1.272 <= bcd <= 1.618
AB=CD
Price difference between AB and CD are equal
Time difference between AB and CD are equal
ABCD Extension
0.618 <= abc <= 0.786
1.272 <= AD/ BC (price) <= 1.618
Gartley
xab = 0.618
0.382 <= abc <= 0.886
1.272 <= bcd <= 1.618 OR xad = 0.786
Crab
0.382 <= xab <= 0.618
0.382 <= abc <= 0.886
2.24 <= bcd <= 3.618 OR xad = 1.618
Deep Crab
xab = 0.886
0.382 <= abc <= 0.886
2.0 <= bcd <= 3.618 OR xad = 1.618
Bat
0.382 <= xab <= 0.50
0.382 <= abc <= 0.886
1.618 <= bcd <= 2.618 OR xad = 0.886
Butterfly
xab = 0.786
0.382 <= abc <= 0.886
1.618 <= bcd <= 2.618 OR 1.272 <= xad <= 2.618
Shark
xab = 0.786
1.13 <= abc <= 1.618
1.618 <= bcd <= 2.24 OR 0.886 <= xad <= 1.13
Cypher
0.382 <= xab <= 0.618
1.13 <= abc <= 1.414
1.272 <= bcd <= 2.0 OR xad = 0.786
Three Drives
oxa = 0.618
1.27 <= xab <= 1.618
abc = 0.618
1.27 <= bcd <= 1.618
5-0
1.13 <= xab <= 1.618
1.618 <= abc <= 2.24
bcd = 0.5
This script contains everything which original script has apart from stats. Use the original script if you are not developer looking for code reference and prefer having stats table.
I have also developed a strategy based on harmonic patterns which can be found here:
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/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.
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 IdentifierI believe the most of users know the Double Top Pattern, so I omit the introduction.
The algorithm uses 10 internal watchers to identify the incomplete M-pattern. If any of the watchers finds the pattern, the signal will be plotted on the chart. You can customize the lookback periods for the watchers as well as you can specify the precision of the difference between two possible tops.
By default, all watchers wait for bar closing to avoid repainting issues. You can switch off this option.
Additionally, you can shift up/down the signal labels to the preferred distance.
NOTE: the orange straight lines are not included.
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.