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! 🚀
Wedgepatterns
Breakout Patterns Detector: Triangle & Wedge [Splirus]This indicator identifies Breakout Patterns such as Ascending Triangles , Descending Triangles , Symmetric Triangles , Ascending Wedges , and Descending Wedges , using candlestick charts and Trendlines. It provides visual cues, stop-loss (SL), and take-profit (TP) levels, alongside a detailed dashboard to evaluate performance. The indicator supports two alert modes: Manual Mode for trader notifications and Bot Mode for automated trading signals.
To achieve optimal results, users are encouraged to experiment with indicator parameters and analyze the dashboard summary to find the perfect configuration for each timeframe, pair, and market condition.
Pattern Identification
The indicator detects the following breakout patterns based on pivot highs and lows:
Ascending Triangle : Flat upper trendline, rising lower trendline.
Descending Triangle : Flat lower trendline, declining upper trendline.
Symmetric Triangle : Converging trendlines with similar slopes (within a user-defined threshold).
Ascending Wedge : Both trendlines slope upward, converging.
Descending Wedge : Both trendlines slope downward, converging.
Patterns are identified using configurable left and right bars for small and big patterns, with slope thresholds normalized by ATR. A trend confirmation filter ensures breakouts align with market direction, and users can adjust breakout confirmation bars to validate signals.
The goal is to fine-tune these settings to suit specific timeframes and pairs, as each combination may require a unique setup for optimal performance.
Stop-Loss Calculation
Stop-loss levels are calculated dynamically based on pattern type and breakout direction:
Symmetric Triangle : SL is set at the first pivot of the opposite trendline, adjusted by a buffer percentage.
Ascending/Descending Triangle : SL is placed at the breakout trendline’s price, plus the buffer.
Ascending/Descending Wedge : SL is set at the second pivot of the opposite trendline, adjusted by the buffer.
The indicator calculates leverage based on a user-defined risk tolerance percentage. Users should adjust the SL buffer and risk tolerance to balance risk and reward, monitoring the dashboard to assess how these settings impact performance across different timeframes and pairs.
Take-Profit Calculation
Three take-profit levels ( TP1 , TP2 , TP3 ) are calculated using pattern height and user-defined multipliers:
For Ascending/Descending Triangles, height is the difference between the max and min prices within the pattern.
For Symmetric Triangles and Wedges, height is the vertical distance between trendlines at the pattern’s start.
TP levels are set as:
TP1 = Breakout price ± (Height × TP1 Multiplier).
TP2 = Breakout price ± (Height × TP2 Multiplier).
TP3 = Breakout price ± (Height × TP3 Multiplier, with a 1.5x adjustment for Wedges).
Experiment with TP multipliers to optimize the risk-reward ratio, using the dashboard to evaluate TP hit rates and overall profitability for each configuration.
Symmetric Triangle:
Ascending/Descending Wedge:
Ascending/Descending Triangles:
Finding the Perfect Configuration
The indicator’s dashboard provides a comprehensive summary of performance metrics, including total trades, TP1/TP2/TP3 hits, SL hits, profit/loss percentages, and win rates for bullish, bearish, and combined trades. These metrics are crucial for identifying the ideal parameter settings:
Timeframe and Pair Variability : Each timeframe (e.g., 15m, 30min, 1H, 4H, Daily) and pair (e.g., BTC/USD, EUR/USD) behaves differently. Adjust parameters like left/right bars, minimum pattern length, and breakout confirmation bars to match the volatility and trend characteristics of the chosen pair and timeframe.
Parameter Tuning : Modify slope thresholds, trend confirmation filters, and bars inside the pattern to filter out false breakouts. For example, a higher breakout confirmation bar setting may reduce signals but increase reliability on longer timeframes.
Dashboard Analysis : Focus on the dashboard’s win rate, profit/loss ratio, and TP/SL hit frequencies. A “Perfect” win rate (>66%) or high TP hit rate indicates a strong configuration. If the SL hit rate is high, consider tightening the trend confirmation filter or increasing the SL buffer.
Iterative Testing : Test different combinations of settings (e.g., small vs. big patterns, aggressive vs. conservative breakout confirmation) and compare dashboard results over time. The goal is to find a balance where the indicator consistently delivers high win rates and profitability for your specific trading setup.
Alert Modes
The indicator supports two alert modes to suit different trading styles:
Manual Mode : Generates alerts for breakouts with entry price, SL, TP1/TP2/TP3, and leverage, tailored for Crypto or Forex markets. Use this mode to manually evaluate signals while refining configurations.
Bot Mode : Sends automated trading signals. To avoid conflicts, Bot Mode ensures no short position alert is triggered while a long position is active, and vice versa. This mode is ideal once you’ve identified an optimal configuration via the dashboard.
Additional Features
Historical Patterns : Displays past trendlines with customizable transparency and extension, helping users analyze how patterns performed under different settings.
Customizable Settings : Adjust pattern size, breakout confirmation, trend filters, and visual preferences (colors, dashboard location) to match your trading style.
Market Compatibility : Supports Crypto and Forex markets across all timeframes, but requires careful tuning for each market type.
Usage Notes
Start with default settings and monitor the dashboard to establish a baseline performance for your chosen timeframe and pair.
Gradually adjust one parameter at a time (e.g., left/right bars, TP multipliers) and compare dashboard results to identify improvements.
Use historical pattern analysis to understand how past breakouts performed under different configurations, guiding your optimization process.
Once a high win rate and profitability are achieved, consider automating trades with Bot Mode for consistent execution.
Disclaimer
This indicator is intended for educational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Users are strongly advised to thoroughly test and validate the indicator’s signals in a demo environment before using it in live trading. The author is not responsible for any financial losses incurred while using this indicator. Always conduct your own research and consult with a qualified financial advisor before making trading decisions.
3 Drive Harmonic Pattern [TradingFinder] Three Drive Reversal🔵 Introduction
The Three Drive harmonic pattern closely resembles other price structures such as Wedge Pattern and Three Push Pattern, yet it stands out due to its precise use of Fibonacci ratios and symmetrical price movements.
This pattern comprises three consecutive and symmetrical price drives, each validated by key Fibonacci ratios (1.27 and 1.618), which help identify critical Potential Reversal Zones (PRZ).
Unlike the Wedge, which relies on converging trend lines and can indicate either continuation or reversal, and the Three Push, which lacks defined Fibonacci ratios and symmetry, the Three Drive pattern defines PRZ with greater accuracy, providing traders with high-probability trading opportunities.
This pattern appears in both bullish and bearish trends. After the completion of the third drive (Drive 3), it signals the market's readiness to reverse direction. The PRZ in this pattern serves as a crucial zone where price is highly likely to reverse, offering a strategic point for entering or exiting trades. Professional traders utilize the Three Drive pattern and PRZ as essential tools for analyzing and capitalizing on potential market reversals.
Bullish Pattern :
Bearish Pattern :
🔵 How to Use
The Three Drive harmonic pattern is an effective tool for identifying potential reversal points in the market. By utilizing Fibonacci extension levels (1.27 and 1.618) and focusing on the pattern’s symmetry, traders can pinpoint Potential Reversal Zones (PRZ) where the price is likely to change direction. This pattern works in both bearish and bullish scenarios, each with distinct characteristics and trading opportunities.
🟣 Bullish Three Drive Pattern
The bullish Three Drive pattern develops during a downtrend, indicating a potential reversal to the upside. Similar to its bearish counterpart, this pattern features three consecutive downward price movements (drives) with retracements in between. The third drive concludes within the PRZ, which serves as a strong support zone where the price is expected to reverse upwards.
The first drive begins with a downward movement, followed by a retracement to the 0.618 Fibonacci level. The second drive continues downward to reach a 1.27 or 1.618 Fibonacci extension of the retracement. Finally, the third drive aligns with the PRZ, where a confluence of Fibonacci levels creates a high-probability support zone.
In the PRZ, traders look for bullish confirmation signals such as bullish candlestick patterns (e.g., bullish engulfing or pin bars) or increasing trading volume. Once confirmation is observed, the PRZ becomes an ideal entry point for a buy position. Stop-loss orders are placed slightly below the PRZ to minimize risk, while take-profit targets are set at key resistance levels or Fibonacci retracement levels.
🟣 Bearish Three Drive Pattern
The bearish Three Drive pattern forms during an uptrend, signaling a potential reversal to the downside. This pattern consists of three consecutive upward price movements (drives) and intermediate retracements. Each drive aligns with Fibonacci extension levels, and the third drive ends within the PRZ, indicating a high probability of a bearish reversal.
In the first drive, the price moves upward and then retraces to approximately the 0.618 Fibonacci retracement level, forming the base for the second drive. The second drive then extends upward to the 1.27 or 1.618 Fibonacci extension of the preceding retracement. This process repeats for the third drive, which reaches the PRZ, typically defined by the convergence of Fibonacci levels from previous drives.
Once the PRZ is identified, traders look for confirmation signals such as bearish candlestick patterns (e.g., bearish engulfing or pin bars) or declining trading volume. If confirmation is present, the PRZ becomes an optimal zone for entering a sell position. Stop-loss levels are typically placed slightly above the PRZ to protect against pattern failure, and take-profit targets are set at key support levels or Fibonacci retracement levels of the overall structure.
🟣 Three Drive Vs Wedge Pattern Vs 3 Push pattern
The Three Drive, Wedge, and Three Push patterns are all used to identify potential price reversal points, but they differ significantly in structure and application. The Three Drive pattern is based on three consecutive and symmetrical price movements, validated by precise Fibonacci ratios (1.27 and 1.618), to define Potential Reversal Zones (PRZ).
In contrast, the Wedge pattern relies on converging trend lines and does not require Fibonacci ratios; it can act as either a reversal or continuation pattern. Meanwhile, the Three Push pattern shares similarities with Three Drive but lacks precise symmetry and Fibonacci-based validation.
Instead of a PRZ, Three Push focuses on identifying areas of support and resistance, often signaling weakening momentum in the current trend. Among these, the Three Drive pattern is more reliable for pinpointing high-probability reversal zones due to its strict Fibonacci-based and symmetrical structure.
🔵 Setting
🟣 Logical Setting
ZigZag Pivot Period : You can adjust the period so that the harmonic patterns are adjusted according to the pivot period you want. This factor is the most important parameter in pattern recognition.
Show Valid Format : If this parameter is on "On" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "Off" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
Show Formation Last Pivot Confirm : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the latest pattern seeing and a sharp reduction in reward to risk.
Period of Formation Last Pivot : Using this parameter you can determine that the last pivot is based on Pivot period.
🟣 Genaral Setting
Show : Enter "On" to display the template and "Off" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Alert Setting
Alert : On / Off
Message Frequency : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone : The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵 Conclusion
The Three Drive pattern is a highly effective harmonic tool for identifying potential reversal points in the market. By leveraging its symmetrical structure and precise Fibonacci ratios (1.27 and 1.618), this pattern provides traders with clear entry and exit signals, enhancing the accuracy of their trades.
Whether in bullish or bearish scenarios, the identification of the Potential Reversal Zone (PRZ) serves as a critical aspect of this pattern, enabling traders to anticipate price movements with greater confidence.
Compared to similar patterns like Wedge and Three Push, the Three Drive pattern stands out for its stringent reliance on Fibonacci levels and symmetrical price movements, making it a more robust choice for forecasting reversals. However, as with any technical analysis tool, its effectiveness increases when combined with confirmation signals, such as candlestick patterns, volume analysis, and broader market context.
Mastering the Three Drive pattern requires practice and attention to detail, especially in accurately defining the PRZ and ensuring the pattern adheres to its criteria. Traders who consistently apply this pattern as part of a comprehensive trading strategy can capitalize on high-probability opportunities and improve their overall performance in the market.
divergingchartpatternLibrary "divergingchartpattern"
Library having implementation of converging chart patterns
getPatternNameByType(patternType)
Returns pattern name based on type
Parameters:
patternType (int) : integer value representing pattern type
Returns: string name of the pattern
method find(this, sProperties, dProperties, patterns, ohlcArray)
find converging patterns for given zigzag
Namespace types: zg.Zigzag
Parameters:
this (Zigzag type from Trendoscope/ZigzagLite/2) : Current zigzag Object
sProperties (ScanProperties) : ScanProperties Object
dProperties (DrawingProperties type from Trendoscope/abstractchartpatterns/5) : DrawingProperties Object
patterns (array type from Trendoscope/abstractchartpatterns/5) : array of existing patterns to check for duplicates
ohlcArray (array type from Trendoscope/ohlc/1) : array of OHLC values for historical reference
Returns: string name of the pattern
ScanProperties
Object containing properties for pattern scanning
Fields:
baseProperties (ScanProperties type from Trendoscope/abstractchartpatterns/5) : Object of Base Scan Properties
convergingDistanceMultiplier (series float)
Three Drive [TradingFinder] 3 Drive Harmonic Pattern Indicator🔵 Introduction
The "Three Drive" pattern is one of the light "RTM" setups suitable for identifying price trend reversals. For this reason, this pattern is considered one of the "Reversal Patterns."
🟣 Bullish 3 Drive
At a price bottom, a formation occurs where the negative trend appears to continue, and lower lows are made.
However, the second low penetrates the range of the first low, and the third low penetrates the range of the second low, indicating a decrease in selling pressure and an increase in buying pressure.
Entry point is issued after the penetration of the third low to the second low, and targets are the highs formed in the "3 Drive."
🟣 Bearish 3 Drive
At a price top, a formation occurs where the positive trend appears to continue, and higher highs are made.
However, the second high penetrates the range of the first high, and the third high penetrates the range of the second high, indicating a decrease in buyers' strength and an increase in sellers' strength.
Entry point is issued after the penetration of the third high to the second high, and targets are the lows formed in the "3 Drive."
Importance :
This pattern bears a striking resemblance to the some of "Harmonic Pattern" and "Ending Diagonal" in the "Elliott Pattern".
🔵 How to Use
There is no need for further confirmation to use this pattern, and you can use it as soon as the pattern forms. However, to reduce errors, it is better to use this pattern when it forms within a "Supply and Demand" or "Support and Resistance" structure.
Bullish 3 Drive in Demand Zone :
Bearish 3 Drive in Supply Zone :
🔵 Settings
You can set your desired "Pivot Period" via settings for the indicator to identify setups based on it.
chartpatternsLibrary "chartpatterns"
Library having complete chart pattern implementation
method draw(this)
draws pattern on the chart
Namespace types: Pattern
Parameters:
this (Pattern) : Pattern object that needs to be drawn
Returns: Current Pattern object
method erase(this)
erase the given pattern on the chart
Namespace types: Pattern
Parameters:
this (Pattern) : Pattern object that needs to be erased
Returns: Current Pattern object
method findPattern(this, properties, patterns)
Find patterns based on the currect zigzag object and store them in the patterns array
Namespace types: zg.Zigzag
Parameters:
this (Zigzag type from Trendoscope/ZigzagLite/2) : Zigzag object containing pivots
properties (PatternProperties) : PatternProperties object
patterns (Pattern ) : Array of Pattern objects
Returns: Current Pattern object
PatternProperties
Object containing properties for pattern scanning
Fields:
offset (series int) : Zigzag pivot offset. Set it to 1 for non repainting scan.
numberOfPivots (series int) : Number of pivots to be used in pattern search. Can be either 5 or 6
errorRatio (series float) : Error Threshold to be considered for comparing the slope of lines
flatRatio (series float) : Retracement ratio threshold used to determine if the lines are flat
checkBarRatio (series bool) : Also check bar ratio are within the limits while scanning the patterns
barRatioLimit (series float) : Bar ratio limit used for checking the bars. Used only when checkBarRatio is set to true
avoidOverlap (series bool)
patternLineWidth (series int) : Line width of the pattern trend lines
showZigzag (series bool) : show zigzag associated with pattern
zigzagLineWidth (series int) : line width of the zigzag lines. Used only when showZigzag is set to true
zigzagLineColor (series color) : color of the zigzag lines. Used only when showZigzag is set to true
showPatternLabel (series bool) : display pattern label containing the name
patternLabelSize (series string) : size of the pattern label. Used only when showPatternLabel is set to true
showPivotLabels (series bool) : Display pivot labels of the patterns marking 1-6
pivotLabelSize (series string) : size of the pivot label. Used only when showPivotLabels is set to true
pivotLabelColor (series color) : color of the pivot label outline. chart.bg_color or chart.fg_color are the appropriate values.
allowedPatterns (bool ) : array of bool encoding the allowed pattern types.
themeColors (color ) : color array of themes to be used.
Pattern
Object containing Individual Pattern data
Fields:
pivots (Pivot type from Trendoscope/ZigzagLite/2) : array of Zigzag Pivot points
trendLine1 (Line type from Trendoscope/LineWrapper/1) : First trend line joining pivots 1, 3, 5
trendLine2 (Line type from Trendoscope/LineWrapper/1) : Second trend line joining pivots 2, 4 (, 6)
properties (PatternProperties) : PatternProperties Object carrying common properties
patternColor (series color) : Individual pattern color. Lines and labels will be using this color.
ratioDiff (series float) : Difference between trendLine1 and trendLine2 ratios
zigzagLine (series polyline) : Internal zigzag line drawing Object
pivotLabels (label ) : array containning Pivot labels
patternLabel (series label) : pattern label Object
patternType (series int) : integer representing the pattern type
patternName (series string) : Type of pattern in string
wedges and flagsThis 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 or triangles.
You can also customize other parameters of the figure, for example, how long the flagpole should be in order to consider such a figure a wedge, a flag or a triangle.
You can also set how large the allowable spread of candles relative to the flagpole can be.
The Sensitivity parameter - will allow you to control the number of patterns detected depending on whether you want the patterns to be detected more often, or if they cover more candles and thus be more reliable
You can also customize your styles.
All key settings are accompanied by tooltips
Wolfe Scanner (Multi - zigzag) [HeWhoMustNotBeNamed]Before getting into the script, I would like to explain bit of history around this project. Wolfe was in the back of my mind for some time and I had several attempts so far.
🎯Initial Attempt
When I first developed harmonic patterns, I got many requests from users to develop script to automatically detect Wolfe formation. I thought it would be easy and started boasting everywhere that I am going to attempt this next. However I miserably failed that time and started realising it is not as simple as I thought it would be. I started with Wolfe in mind. But, ran into issues with loops. Soon figured out that finding and drawing wedge is more trickier. I decided will explore trendline first so that it can help find wedge better. Soon, the project turned into something else and resulted in Auto-TrendLines-HeWhoMustNotBeNamed and Wolfe left forgotten.
🎯Using predefined ratios
Wolfe also has predefined fib ratios which we can use to calculate the formation. But, upon initial development, it did not convince me that it matches visual inspection of Wolfe all the time. Hence, I decided to fall back on finding wedge first.
🎯 Further exploration in finding wedge
This attempt was not too bad. I did not try to jump into Wolfe and nor I bragged anywhere about attempting anything of this sort. My target this time was to find how to derive wedge. I knew then that if I manage to calculate wedge in efficient way, it can help further in finding Wolfe. While doing that, ended up deriving Wedge-and-Flag-Finder-Multi-zigzag - which is not a bad outcome. I got few reminders on Wolfe after this both in comments and in PM.
🎯You never fail until you stop trying!!
After 2 back to back hectic 50hr work weeks + other commitments, I thought I will spend some time on this. Took less than half weekend and here we are. I was surprised how much little time it took in this attempt. But, the plan was running in my subconscious for several weeks or even months. Last two days were just putting these plans into an action.
Now, let's discuss about the script.
🎲 Wolfe Concept
Wolfe concept is simple. Whenever a wedge is formed, draw a line joining pivot 1 and 4 as shown in the chart below:
Converging trendline forms the stop loss whereas line joining pivots 1 and 4 form the profit taking points.
🎲 Settings
Settings are pretty straightforward. Explained in the chart below.