INVITE-ONLY SCRIPT

RunRox - Harmonic Patterns

430
📐 RunRox - Harmonic Pattern indicator, we are pleased to present our new, built upon sophisticated logic for identifying and plotting harmonic formations directly on your charts. Significant effort and research have been invested into the development of this indicator, and now it is ready to be included in our premium indicator package.

In this post, we will provide a comprehensive overview of our indicator, describing all its key features, capabilities, and possible use cases. We strongly recommend reading the entire post thoroughly to fully understand the logic and operation behind our new Harmonic Pattern indicator.

📜 A BRIEF HISTORY

Harmonic patterns are specialized chart formations based on Fibonacci ratios, used by traders to identify potential reversal points in financial markets. Originally introduced by H.M. Gartley in the 1930s and later refined by Scott Carney, harmonic patterns became widely recognized for their effectiveness in forecasting precise turning points and market reversals. Over the years, these patterns have become an essential tool for traders employing technical analysis.

📌 INDICATOR FEATURES

Identification of 3 pattern sets:
  • ✅ 5 Classic Chart Patterns:
    Head and Shoulders, Triangle, Wedge, Flag, Double Top/Bottom

  • ✅ 11 Harmonic Patterns:
    Bat, Alternate Bat, Butterfly, Crab, Deep Crab, Gartley, Shark, Cypher, 5-0 Pattern, AB=CD, 3-Drive

  • ✅ 10 Non-standard Harmonic Patterns:
    Nen Star, White Swan, Black Swan, Anti-Bat, Anti-Butterfly, Anti-Crab, Anti-Gartley, Anti-Shark, Anti-Cypher, Anti-Nen Star

Additional features:
  • Built-in backtesting system
  • Pattern win-rate calculation
  • Flexible Stop Loss settings
  • Flexible Take Profit settings
  • Customizable pattern detection parameters
  • Advanced trailing stop functionality
  • Flexible notification system
  • And much more.


Below is a screenshot visually illustrating all the classic chart patterns that our indicator identifies on the chart.
istantanea

This is how the 11 harmonic patterns visually appear on the chart.
istantanea

10 Non-standard harmonic patterns visually represented on the chart.
istantanea

🔸 XABCD are standard letters representing specific points used in forming harmonic patterns. The sequence always begins with the point X as the initial reference point, followed by points ABCD, which together complete the harmonic pattern.

These points are identified using a specialized method, scanning through thousands of potential points on the chart simultaneously. The indicator analyzes numerous potential formations, selecting and displaying only those patterns that meet specific validation criteria. This meticulous process ensures that only valid and accurate patterns appear on your chart, as illustrated in the screenshot below.
istantanea

🔸 Ratio: Between the points XABCD, you’ll notice the “Ratio,” indicating the proportional relationships required between these points to correctly form harmonic patterns. The indicator displays a pattern on the chart only when these ratio conditions are precisely met, thereby maximizing accuracy and ensuring the validity of identified patterns. This aspect is clearly demonstrated in the screenshot below.
istantanea

🔸 TP and SL levels: For each identified pattern, we also display recommended Take Profit (TP) and Stop Loss (SL) levels directly on the chart. Additionally, we provide a suggested entry price (Entry Level). It is important to note that entering a trade requires the price to retrace into the specified Entry Level zone. Therefore, you must wait until the price returns to this zone for the pattern to be considered fully formed and ready for entry.
istantanea

Using the Butterfly pattern as an example, we’ve illustrated all the key components of a pattern. Our indicator offers extensive customization, allowing you to finely adjust everything from the acceptable Ratio ranges to Stop Loss and Take Profit levels, among many other parameters. Below, we’ll discuss the indicator’s capabilities and its customizable settings in detail.


📶 ACTIVE PATTERNS PANEL
istantanea
In the screenshot above, you can see the panel displaying all active patterns currently formed on the chart, including the pattern direction, entry price, two take profit levels, and the stop loss level. This provides a quick and clear overview of the available patterns on your chart, significantly speeding up your trading process.

Additionally, you can fully customize this panel, adjusting its position, size, or even completely removing it if you prefer.


📊 PATTERN STATISTICS
istantanea
The Pattern Statistics Panel displays historical performance results for all patterns. The indicator automatically performs backtesting for each pattern based on historical data, taking into account all user-defined settings. Results are conveniently presented in this panel.

This feature is highly practical as it allows you to quickly evaluate the effectiveness of each pattern directly on your chart. As a result, you can easily identify which patterns are performing best and which patterns might be less effective and therefore unsuitable for trading on the current instrument.

Furthermore, the panel organizes patterns into specific categories Classical, Harmonic, and Anti-Harmonic and separates results by trade direction (Long or Short). This helps you quickly determine the optimal trading direction for each pattern category.

⚙️ INDICATOR SETTINGS

Now, it’s time to discuss the indicator settings in detail and describe all the available options and features that you can customize according to your preferences.

🔶 Detection Settings
istantanea
In the screenshot above, you see the first settings block with the following options:

  • FastMode – When activated, only patterns are displayed on the chart, without the results table. This significantly speeds up the pattern rendering process and makes the script run faster.
  • Error % – Allows you to specify a permissible deviation from the ideal XABCD parameters. By increasing this percentage, the indicator will detect more patterns, but they will deviate from the ideal ratio proportions by the percentage you’ve set.
  • Search Priority – Choose between “Large First” or “Small First” pattern prioritization. With “Large First,” the indicator prioritizes detecting larger patterns first; smaller patterns are only displayed if no suitable large patterns are available, and vice versa.
  • ZigZag Period – Determines the period for the ZigZag structure used as a foundation for pattern detection. It’s an essential parameter that directly affects the number and quality of detected patterns.
  • Pattern Size – Specify the desired size of patterns in terms of the number of bars on the chart.
  • Remove patterns older than, bars – Allows you to remove old patterns from the chart and prevent their display if they formed more than a set number of bars ago (default is 200 bars).


🔶 Entry / Target / StopLoss Settings
istantanea
In the screenshot above, you can see the settings related to configuring your preferred entry points, target levels, and stop-loss strategies. Below is a detailed explanation of each option:

  • Trade Direction – Both / Long / Short - Choose the direction in which you want to trade. Selecting “Both” will search for patterns in both directions, while “Long” or “Short” will filter the patterns to show only those that align with the selected direction.
  • Entry % - This sets the entry level as a percentage of the pattern’s total size. It determines how far from the pattern’s starting point the entry will be placed.
  • Target 1 - Also defined as a percentage of the pattern size. This represents the distance from the entry point to the first take profit level.
  • Target 2 - Optionally, you can enable a second take profit level and set the percentage distance for it.
  • Stop-Loss Type - Choose from six different stop-loss types: Invalidation Price, Last Pivot, %, % of pattern size, Pips, or Risk/Reward ratio. Each provides flexibility depending on your trading style.
  • Stop-Loss SL Value - This is the specific value related to the chosen stop-loss type. For example, if you choose the “%” type, this setting will define the percentage used to place the Stop Loss level.


istantanea
Using the Shark pattern as an example, let’s demonstrate how the entry, target, and stop-loss levels function. Based on the overall size of the pattern, you can input the desired percentage values for your trade entry, target, and stop-loss levels, and the indicator will automatically calculate their exact placement relative to the pattern’s structure.

You can also choose alternative stop-loss methods, such as Risk/Reward, in which case the stop-loss will be dynamically calculated based on the risk-to-reward ratio you define.

It’s also important to note that for harmonic patterns, the height of the pattern is calculated based on the segment from point C to point D. However, for the Black Swan pattern, the measurement is taken from point A to point D. This distinction should be kept in mind when configuring your stop-loss levels.

Additionally, classic patterns each have their own unique method for calculating pattern height, depending on the specific structure.

🔶 Trailing Stop Settings

These settings are designed to help improve your strategy’s results, especially if you use break-even stop-loss adjustments after reaching specific targets, which can help increase your win rate.
istantanea
  • Move SL to Break-even after reaching Target 1 - Enabling this option will automatically move the stop-loss to the entry level (break-even) once the price hits the first target (Target 1).
  • Trailing Stop Type - Choose from three trailing stop types: Percentage (%), % of pattern size, Pips
  • Trailing Stop Value - Enter the desired value for the chosen trailing stop type. For example, if you selected %, the number entered will be treated as a percentage. If you chose Pips, it will be the number of pips for the trailing stop.
  • Enable Trailing Stop at reaching - This setting defines when the trailing stop should be activated. You can choose from four options: Target 1, %, % of pattern size, Pips
  • Trailing After Value - This works in combination with the previous setting. If you choose one of the three non-Target options, this field lets you enter the specific value that will trigger the trailing stop.


🔶 Display Settings
istantanea

In the screenshot above, you can see the Display Settings section, which allows you to fully customize the visual appearance of patterns on your chart according to your preferences.

You can choose to show or hide pattern labels (XABCD), ratio values, entry/TP/SL levels, and pattern fill for better visual clarity.

Additionally, you can set the maximum number of active patterns displayed on the chart, as well as view the historical formations of any specific pattern to analyze how it appeared in past price action.

🔶 Dashboard | Pattern Table
istantanea

In the screenshot above, you can see the settings for two tables: one displaying the results of each pattern, and the other showing active patterns currently on the chart. Both tables offer flexible customization options, allowing you to adjust their color schemes, sizes, and on-screen positions to best fit your workflow.

🔶 Patterns Setting
istantanea

For each individual pattern, you can customize its appearance by selecting your preferred color, adjusting its transparency, or even hiding it entirely from the chart if you don’t wish to display it.

🔶 Notifications
istantanea

You can easily configure notifications for various events, such as the appearance of a new pattern or when the price reaches the entry level of a trade.

Additionally, a dedicated panel allows you to use macros for advanced customization of your alerts, so you can tailor the notifications exactly to your needs and trading style.

List of Supported Placeholders:
Pine Script®
{{event}} - Event name ('New Pattern', 'Target 1', etc.) {{pattern}} - Pattern name ('Bat', 'Crab', etc.) {{event_price}} - Event Price (entry price for entry event, sl price for sl event, etc.) {{sl}} - Stop-loss price {{entry}} - Entry Price {{target1}}, {{target2}} - Target Prices {{invalidation}} - Invalidation Price {{exchange}} - Exchange ('Binance') {{ticker}} - Ticker ('BTCUSD') {{interval}} - Timeframe ('1s', '1', 'D') {{open}}-{{close}}-{{high}}-{{low}} - Candle price values {{volume}} - Candle volume {{time}} - Candle open time in UTC timezone {{timenow}} - Signal time in UTC timezone {{syminfo.currency}} - 'USD' for BTCUSD pair {{syminfo.basecurrency}} - 'BTC' for BTCUSD pair


✅ USAGE METHODS

The indicator and its patterns can be used as a standalone trading strategy, providing clear entry points, stop-loss levels, and take-profit targets - without the need for any additional tools or indicators.

However, for optimal results, we recommend integrating the indicator with your existing trading strategy. Using it as a confluence tool - alongside other technical indicators or as a complement to your fundamental analysis - can significantly enhance your decision-making and improve overall performance!

🟠 Disclaimer

Past performance is not indicative of future results. To trade successfully, it is crucial to have a thorough understanding of the market context and the specific situation at hand. Always conduct your own research and analysis before making any trading decisions.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.