Custom Date MarkersCustom Date Markers - Pine Script Indicator
This indicator provides a powerful visual tool for technical and pattern analysis by allowing traders to mark up to 10 specific historical dates with customizable vertical lines on any chart. Each date can be assigned its own unique color, making it easy to categorize and distinguish between different types of events or market catalysts.
Primary Use Cases:
The indicator excels at identifying cyclical patterns and recurring market behavior. By marking significant dates such as earnings announcements, Federal Reserve meetings, dividend ex-dates, or seasonal events, traders can quickly visualize whether stocks consistently react in similar ways around these recurring dates. This is particularly valuable for discovering hidden patterns that might not be obvious from price action alone.
Practical Applications:
Earnings Analysis: Mark historical earnings dates to see if a stock tends to rally or sell-off before/after announcements
Macro Events: Identify how assets respond to FOMC meetings, CPI releases, or other economic data
Seasonal Patterns: Track dates that show recurring volatility or directional moves (like tax deadline periods, end-of-quarter re balancing, etc.)
Event Studies: Analyze the impact of company-specific events like product launches, FDA approvals, or leadership changes
Advanced Insights:
What makes this tool particularly interesting is its ability to reveal non-obvious correlations. For example, you might discover that a retail stock consistently experiences volume spikes 2-3 weeks before Black Friday across multiple years, or that certain tech stocks show weakness during specific conference dates. The color-coding feature allows you to layer multiple event types simultaneously—perhaps using red for bearish catalysts and green for bullish ones—creating a visual heat map of historical market reactions.
The indicator's 6-month default spacing (covering 4.5 years) is strategically designed to capture multiple business cycles while maintaining clarity on the chart. This timeframe is long enough to identify genuine patterns rather than coincidences, yet focused enough to remain relevant to current market conditions.
Pro Tip: Combine this indicator with volume analysis or other technical indicators to validate whether the patterns you observe are accompanied by meaningful market participation or if they're statistical noise.
#patterns
RB — Rejection Blocks (Price Structure)This indicator detects and visualizes Rejection Blocks (RBs) using pure price action logic.
A bullish RB occurs when a down candle forms a lower low than both its neighbors. A bearish RB occurs when an up candle forms a higher high than both its neighbors.
Validated RBs are displayed as boxes, optional lines, or labels. Blocks are automatically removed when invalidated (price closes through them), keeping the chart uncluttered and focused.
How to use
• Apply on any timeframe, from intraday to higher timeframes.
• Watch how price reacts when revisiting RB zones.
• Treat these zones as contextual areas, not entry signals.
• Combine with your own trading methods for confirmation.
Originality
Unlike generic support/resistance tools, this indicator isolates a specific structural pattern (rejection blocks) and renders it visually on the chart. This selective focus allows traders to study structural reactions with more clarity and precision.
⚠️ Disclaimer: This is not a trading system or a signal provider. It is a visual analysis tool designed for structural and educational purposes.
CRT + PO3 Range Theory Hey everyone, I’ve put together a little script for TradingView that tries to show the classic CRT + PO3 (Power of Three) pattern. It’s still a work in progress, so please use it on a demo account and let me know what you think!
What It Does
Accumulation Phase: On each higher‐timeframe bar (e.g. 2-hour), it draws a shaded zone where price is hanging out. That’s when we assume “big players” are quietly building positions.
Manipulation Phase: If price briefly pokes above or below that zone but then slips back inside, it marks that wick as a shake-out.
Distribution Phase: When price finally closes cleanly outside the zone, it draws another shaded area and drops a “Distribution” label plus a big LONG or SHORT arrow on that bar.
You can tweak it so it only shows signals when a bar closes (no more weird flashing mid-bar), or even allow “direct” Distribution on a clean breakout without waiting for a fake wick first.
How to Set It Up
Add the script from your Indicators list.
Pick your HTF (I like 2-hour or 4-hour).
Turn “Show Zone Labels” on or off—these are the little “Accumulation/Manipulation/Distribution” tags.
Turn “Show Entry Signals” on to get the big LONG/SHORT arrows.
If you hate flicker, check “Show signals only at bar close.”
If you want to catch a swift breakout (no fake-out needed), check “Allow direct Distribution on clean breakout.”
There are also sliders for zone colors, transparency, label size, and how far above/below the bars the labels sit.
Why It’s Still a Beta
I’m not a CRT/PO3 guru—this is more of a hobby project and a little facination for this strategy.
There might be edge cases where it misses a shake-out or flags a Distribution too early.
I take no responsibility for your trades—please only run it on a demo account until we’ve worked out the quirks.
Feedback Wanted!
If you try it out, I’d love to hear:
Did the Manipulation wicks line up where you expected?
Were the Distribution arrows on the right bars?
Any ideas for easier settings or extra alerts?
Thanks for testing and helping me turn this into something solid!
Yearly History Calendar-Aligned Price up to 10 Years)Overview  
This indicator helps traders compare historical price patterns  from the past 10 calendar years with the current price action. It overlays translucent lines (polylines) for each year’s price data on the same calendar dates, providing a visual reference for recurring trends. A dynamic table at the top of the chart summarizes the active years, their price sources, and history retention settings. 
Key Features  
    Historical Projections    
        Displays price data from the last 10 years (e.g., January 5, 2023 vs. January 5, 2024).  
               
    Price Source Selection    
        Choose from Open, Low, High, Close, or HL2 ((High + Low)/2) for historical alignment.  
        The selected source is shown in the legend table.
         
    Bulk Control Toggles    
        Show All Years : Display all 10 years simultaneously.  
        Keep History for All : Preserve historical lines on year transitions.  
        Hide History for All : Automatically delete old lines to update with current data.
         
    Individual Year Settings    
        Toggle visibility for each year (-1 to -10) independently.  
        Customize color and line width for each year.  
        Control whether to keep or delete historical lines for specific years.
         
    Visual Alignment Aids    
        Vertical lines mark yearly transitions for reference.  
        Polylines are semi-transparent for clarity.
         
    Dynamic Legend Table    
        Shows active years, their price sources, and history status (On/Off).  
        Updates automatically when settings change.
        
   
How to Use  
    Configure Settings    
        Projection Years : Select how many years to display (1–10).  
        Price Source : Choose Open, Low, High, Close, or HL2 for historical alignment.  
        History Precision : Set granularity (Daily, 60m, or 15m).  
            Daily (D)  is recommended for long-term analysis (covers 10 years).  
            60m/15m  provides finer precision but may only cover 1–3 years due to data limits.
             
        
    Adjust Visibility & History    
        Show Year -X : Enable/disable specific years for comparison.  
        Keep History for Year -X : Choose whether to retain historical lines or delete them on new year transitions.
         
    Bulk Controls    
        Show All Years : Display all 10 years at once (overrides individual toggles).  
        Keep History for All / Hide History for All : Globally enable/disable history retention for all years.
         
    Customize Appearance    
        Line Width : Adjust polyline thickness for better visibility.  
        Colors : Assign unique colors to each year for easy identification.
         
    Interpret the Legend Table    
        The table shows:  
            Year : Label (e.g., "Year -1").  
            Source : The selected price type (e.g., "Close", "HL2").  
            Keep History : Indicates whether lines are preserved (On) or deleted (Off).
             
         
   
Tips for Optimal Use  
    Use Daily Timeframes for Long-Term Analysis :  
        Daily (1D) allows 10+ years of data. Smaller timeframes (60m/15m) may have limited historical coverage.
         
    Compare Recurring Patterns :  
        Look for overlaps between historical polylines and current price to identify potential support/resistance levels.
         
    Customize Colors & Widths :  
        Use contrasting colors for years you want to highlight. Adjust line widths to avoid clutter.
         
    Leverage Global Toggles :  
        Enable Show All Years for a quick overview. Use Keep History for All to maintain continuity across transitions.
         
     
Example Workflow  
    Set Up :   
        Select Projection Years = 5.  
        Choose Price Source = Close.  
        Set History Precision = 1D for long-term data.
         
    Customize :   
        Enable Show Year -1 to Show Year -5.  
        Assign distinct colors to each year.  
        Disable Keep History for All to ensure lines update on year transitions.
         
    Analyze :   
        Observe how the 2023 close prices align with 2024’s price action.  
        Use vertical lines to identify yearly boundaries.
         
     
Common Questions  
    Why are some years missing?    
        Ensure the chart has sufficient historical data (e.g., daily charts cover 10 years, 60m/15m may only cover 1–3 years).
         
    How do I update the data?    
        Adjust the Price Source or toggle years/history settings. The legend table updates automatically.
         
         
     
NR4 & NR7 with Breakouts [LuxAlgo]NR4 & NR7 with Breakouts is a simple indicator that utilizes the NR4 and NR7 candle patterns to display candle ranges and signals from range breakouts.
🔶  USAGE 
  
The Narrow Range Patterns are candle formations determined by the last candle having a narrower (high-low) range than the previous number. This indicator showcases the 2 most recognized Narrow Range Patterns, which are the 4 and 7 bar variants (NR4 and NR7).
These patterns, introduced by Toby Crabel, are thought to provide insight for potential market breakouts by identifying periods of low volatility indicated by a candle with a small range. This is due to the idea that markets often move from periods of low volatility (contraction) to high volatility (expansion), and the NR4 and NR7 patterns help spot these transitions. 
By utilizing these patterns, traders are better able to anticipate and respond to market shifts for better decision-making and risk management.
 NOTE:  These patterns have traditionally been studied on the Daily Timeframe Chart. This indicator allows the user to select a timeframe to generate these patterns from. It is suggested to be mindful of this when considering these patterns. 
  
In this indicator, on the bar after the pattern is detected, the Narrow Range Bar will be highlighted with a zone, and lines displaying the range will extend from it. These ranges are helpful for providing levels to set limit orders and for managing risk.
Users are able to adjust which pattern they want visualized on their chart, please note; 
 All NR7s are NR4s but not all NR4s are NR7s. 
Because of this, you will notice that when selecting "NR4" to display, the colors will change, but the detected ranges will not change.
🔹  Signals  
  
When a Narrow Range Bar is detected, the script will wait for the price to close outside of the Range, then a signal will fire indicating the direction of exit.  The signals are produced from the last NR4 or NR7 and will have the potential to fire from that range until a new NR4 or NR7 is detected.
After a signal fires, the logic goes into a "reset" period where it will wait for the price to reach the Range Mean before firing another signal.
These signals can be anticipated by considering the underlying logic and watching price approach the range extremities, and can be improved by utilizing other market information for confluence.
🔶  SETTINGS 
 
 Timeframe:  Choose which timeframe to identify the NR4 and NR7 Pattern on. This must be Higher than the chart timeframe.
 Pattern Type:  Choose which (or all) patterns to display.
TradeTrackerLibrary   "TradeTracker" 
Simple Library for tracking trades
 method track(this) 
  tracks trade when called on every bar
  Namespace types: Trade
  Parameters:
     this (Trade) : Trade object
  Returns: current Trade object
 Trade 
  Has the constituents to track trades generated by any method.
  Fields:
     id (series int) 
     direction (series int) : Trade direction. Positive values for long and negative values for short trades
     initialEntry (series float) : Initial entry price. This value will not change even if the entry is changed in the lifecycle of the trade
     entry (series float) : Updated entry price. Allows variations to initial calculated entry. Useful in cases of trailing entry.
     initialStop (series float) : Initial stop. Similar to initial entry, this is the first calculated stop for the lifecycle of trade.
     stop (series float) : Trailing Stop. If there is no trailing, the value will be same as that of initial trade
     targets (array) : array of target values.
     startBar (series int) : bar index of starting bar. Set by default when object is created. No need to alter this after that.
     endBar (series int) : bar index of last bar in trade. Set by tracker on each execution
     startTime (series int) : time of the start bar. Set by default when object is created. No need to alter this after that.
     endTime (series int) : time of the ending bar. Updated by tracking method.
     status (series int) : Integer parameter to track the status of the trade
     retest (series bool) : Boolean parameter to notify if there was retest of the entry price
Clean OHLC Lines | BaksPlots clean, non-repainting OHLC lines from higher timeframes onto your chart. Ideal for tracking key price levels (open, high, low, close) with precision and minimal clutter.
Core Functionality
Clean OHLC Lines = Historical Levels + Non-Repainting Logic
• Uses lookahead=on to anchor historical lines, ensuring no repainting.
• Displays OHLC lines for customizable timeframes (15min to Monthly).
• Optional candlestick boxes for visual context.
Key Features
• Multi-Timeframe OHLC:
Plot lines from 15min, 30min, 1H, 4H, Daily, Weekly, or Monthly timeframes.
• Non-Repainting Logic:
Historical lines remain static and never recalculate.
• Customizable Styles:
Adjust colors, line widths (1px-4px), and transparency for high/low/open/close lines.
• Candle Display:
Toggle candlestick boxes with bull/bear colors and adjustable borders.
• Past Lines Limit:
Control how many historical lines are displayed (1-500 bars).
User Inputs
• Timeframe:
Select the OHLC timeframe (e.g., "D" for daily).
• # Past Lines:
Limit historical lines to avoid overcrowding (default: 10).
• H/L Mode:
Draw high/low lines from the current or previous period.
• O/C Mode:
Anchor open/close lines to today’s open or yesterday’s close.
• Line Styles:
Customize colors, transparency, and styles (solid/dotted/dashed).
• Candle Display:
Toggle boxes/wicks and adjust bull/bear colors.
Important Notes
⚠️ Alignment:
• Monthly/weekly timeframes use fixed approximations (30d/7d).
• For accuracy, ensure your chart’s timeframe ≤ the selected OHLC timeframe (e.g., use 1H chart for daily lines).
⚠️ Performance:
• Reduce # Past Lines on low-end devices for smoother performance.
Risk Disclaimer
Trading involves risk. OHLC lines reflect historical price levels and do not predict future behavior. Use with other tools and risk management.
Open-Source Notice
This script is open-source under the Mozilla Public License 2.0. Modify or improve it freely, but republishing must follow TradingView’s House Rules.
📈 Happy trading!
Multi Timeframe Market Formation [LuxAlgo]The  Multi Timeframe Market Formation  tool allows traders to analyze up to 6 different timeframes simultaneously to discover their current formation, S/R levels and their degree of synchronization with the current chart timeframe. Multi timeframe analysis made easy.
🔶  USAGE 
  
By default, the tool displays the chart's timeframe formation plus up to 5 other formations on timeframes higher than the one in the chart.
When the chart formation is synchronized with any enabled timeframe formation, the tool displays labels and a trailing channel, it uses a gradient by default, so the more timeframes are synchronized, the more visible the labels and the trailing channel are.
All timeframes enabled in the settings panel must be higher than the chart timeframe, otherwise the tool will display an error message.
🔹  Formations 
  
A formation is a market structure defined by a lower and an upper boundary (also known as support & resistance).
Each formation has a different symbol and color to identify it at a glance.
It helps traders to know the current market behavior and the tool displays up to 5 of them.
 
 BULLISH (green ▲):  higher high and higher low
 BEARISH (red ▼):  lower high and lower low
 CONTRACTION (orange ◀):  lower high and higher low
 EXPANSION (blue ▶):  higher high and lower low
 SIDEWAYS (yellow ◀):  Any that does not fit with the others
 
🔹  Multi Timeframe Formations 
  
The tool displays up to 6 different timeframe formations, the chart timeframe plus 5 more configurable from the settings panel.
Each of them has an upper and lower limit, a timeframe, a color and an icon.
If a bound level is shared by more than one formation, the timeframes and symbols are displayed on the same line.
These are significant levels shared by different timeframes and traders need to be aware of them.
🔹  Sync With Chart Timeframe 
  
If the current formation on the chart timeframe is in sync with any of the timeframes enabled in the settings panel, the tool will display this on the chart.
The more timeframes are in sync, the more they are visible, providing a clear visual representation of the common market behavior on multiple timeframes at the same time.
🔶  SETTINGS 
 
 Formation size:  Size of market formations on the chart timeframe
 
🔹  Timeframes 
 
 TF1 to TF5:  Activate/deactivate timeframe, set size of market formation and activate/deactivate high and low levels
 
🔹  Style 
 
 Show Labels:  Enable/Disable Timeframe Sync Labels
 Transparency Gradient:  Enable/Disable Transparency Gradient
 Show Trailing Channel | Multiplier:  Enable/Disable Trailing Channel and set multiplier
 Color for each formation 
Max/Min LevelsHighlights highs and lows that match the search criteria. A high is considered to be broken if the candlestick breaks through its shadow
A three-candlestick pattern will match the parameters:
 
 Candle before - 1
 Candle after - 1
 
A five-candlestick pattern will match the parameters:
 
 Candle before - 2
 Candle after - 2
Advanced Pattern Detector**Script Overview**
**Indicator Name:** Advanced Pattern Detector
**Pine Script Version:** v5
**Indicator Type:** Overlaid on the chart (overlay=true)
**Main Features:**
- Detection and visualization of various technical patterns.
- Generation of BUY and SELL signals based on detected patterns.
- Display of Fibonacci levels to identify potential support and resistance levels.
- Ability to enable or disable each pattern through the indicator settings.
---
**Indicator Settings**
**Switches to Enable/Disable Patterns**
At the top of the indicator, there are parameters that allow the user to select which patterns will be displayed on the chart:
- Three Drives
- Rounding Top
- Rounding Bottom
- ZigZag Pattern
- Inverse Head and Shoulders
- Fibonacci Retracement
**Parameters for ZigZag**
Settings are also available for the ZigZag pattern, such as the depth of peak and trough detection, allowing the user to adjust the indicator's sensitivity to price changes.
---
**Pattern Detection**
Each pattern is implemented with its own logic, which checks specific conditions on the current bar (candle). Below are the main patterns:
1. **Three Drives**
   - **Description:** This pattern consists of three consecutive price movements in one direction (up or down). It can signal the continuation of the current trend or its reversal.
   - **How It Works:**
     - **Upward Drive:** The indicator checks that the closing price of each subsequent candle is higher than the previous one for three bars.
     - **Downward Drive:** The indicator checks that the closing price of each subsequent candle is lower than the previous one for three bars.
2. **Rounding Top**
   - **Description:** A pattern representing a smooth decrease in maximum prices over several bars, which may indicate a potential downward trend reversal.
   - **How It Works:**
     - The indicator checks that the maximum prices of the last five bars are gradually decreasing, and the current bar shows a decrease in the maximum price.
3. **Rounding Bottom**
   - **Description:** A pattern characterized by a smooth increase in minimum prices over several bars, signaling a possible upward trend reversal.
   - **How It Works:**
     - The indicator checks that the minimum prices of the last five bars are gradually increasing, and the current bar shows an increase in the minimum price.
4. **ZigZag Pattern**
   - **Description:** Used to identify corrective movements on the chart. The pattern shows peak and trough points connected by lines, helping to visualize the main price movement.
   - **How It Works:**
     - The indicator uses a function to determine local maxima and minima based on the specified depth.
     - Detected peaks and troughs are connected by lines to create a visual zigzag structure.
5. **Inverse Head and Shoulders**
   - **Description:** An inverted head and shoulders formation signals a possible reversal of a downward trend to an upward one.
   - **How It Works:**
     - The indicator looks for three local minima: the left shoulder, the head (the lowest minimum), and the right shoulder.
     - It checks that the left and right shoulders are approximately at the same level and below the head.
6. **Fibonacci Retracement Levels**
   - **Description:** Automatically builds key Fibonacci levels based on the maximum and minimum prices over the last 50 bars. These levels are often used as potential support and resistance levels.
   - **How It Works:**
     - Daily, the minimum and maximum prices over the last 50 bars are calculated.
     - Based on these values, Fibonacci levels are drawn: 100%, 23.6%, 38.2%, 50%, 61.8%, and 0%.
     - Old levels are removed when a new day begins to keep the chart clean and up-to-date.
---
**Generation of Buy and Sell Signals**
The indicator combines the results of detected patterns to generate trading signals:
- **Buy Signals (BUY):**
  - Rounding Bottom
  - Three Drives Up
  - Inverse Head and Shoulders
  - ZigZag Low
- **Sell Signals (SELL):**
  - Rounding Top
  - Three Drives Down
  - Inverse Head and Shoulders
  - ZigZag High
**How It Works:**
- If one or more buy conditions are met, a "BUY" label is displayed below the corresponding bar on the chart.
- If one or more sell conditions are met, a "SELL" label is displayed above the corresponding bar on the chart.
---
**Visualization of Patterns on the Chart**
Each detected pattern is visualized using various graphical elements, allowing traders to easily identify them on the chart:
- **Three Drives Up:** Green upward triangle below the bar.
- **Three Drives Down:** Red downward triangle above the bar.
- **Rounding Top:** Orange "RT" label above the bar.
- **Rounding Bottom:** Blue "RB" label below the bar.
- **Inverse Head and Shoulders:** Turquoise "iH&S" label below the bar.
- **ZigZag High/Low:** Purple circles at the peaks and troughs of the zigzag.
---
**Displaying Fibonacci Levels**
Fibonacci levels are displayed as horizontal lines on the chart with corresponding labels. These levels help traders determine potential entry and exit points, as well as support and resistance levels.
---
**Drawing ZigZag Lines**
ZigZag lines connect the detected peaks and troughs, visualizing corrective movements. To avoid cluttering the chart, the number of lines is limited, and old lines are automatically removed as new ones are added.
ABCD Harmonic Pattern [TradingFinder] ABCD Pattern indicator🔵 Introduction 
The ABCD harmonic pattern is a tool for identifying potential reversal zones (PRZ) by using Fibonacci ratios to pinpoint critical price reversal points on price charts. 
This pattern consists of four key points, labeled A, B, C, and D. In this structure, the AB and CD waves move in the same direction, while the BC wave acts as a corrective wave in the opposite direction.
The ABCD pattern follows specific Fibonacci ratios that enhance its accuracy in identifying PRZ. Typically, point C lies within the 0.382 to 0.886 Fibonacci retracement of the AB wave, indicating the correction extent of the BC wave. 
Subsequently, the CD wave, as the final wave in this pattern, reaches point D with a Fibonacci extension between 1.13 and 2.618 of the BC wave. Point D, which marks the PRZ, is where a potential price reversal is likely to occur.
The ABCD pattern appears in both bullish and bearish forms. In the bullish ABCD pattern, prices tend to increase at point D, which defines the PRZ; in the bearish ABCD pattern, prices typically decrease upon reaching the PRZ at point D. 
These characteristics make the ABCD pattern a popular tool for identifying PRZ and price reversal points in financial markets, including forex, cryptocurrencies, and stocks.
 Bullish Pattern :
  
 Beaish Pattern :
  
🔵 How to Use 
🟣 Bullish ABCD Pattern 
The bullish ABCD pattern is another harmonic structure used to identify a potential reversal zone (PRZ) where the price is likely to rise after a downward movement. This pattern includes four main points A, B, C, and D. In the bullish ABCD, the AB and CD waves move downward, and the BC wave acts as a corrective, upward wave. This setup creates a PRZ at point D, where the price may reverse and move upward.
To identify a bullish ABCD pattern, begin with the downward AB wave. The BC wave retraces upward between 0.382 and 0.886 of the AB wave, indicating the extent of the correction. 
After the BC retracement, the CD wave forms and extends from point C down to point D, with an extension of around 1.13 to 2.618 of the BC wave. Point D, as the PRZ, represents the area where the price may reverse upwards, making it a strategic level for potential buy positions.
When the price reaches point D in the bullish ABCD pattern, traders look for upward reversal signals. This can include bullish candlestick formations, such as hammer or morning star patterns, near the PRZ to confirm the trend reversal. Entering a long position after confirmation near point D provides a calculated entry point. 
Additionally, placing a stop loss slightly below point D helps protect against potential loss if the reversal does not occur. The ABCD pattern, with its precise Fibonacci structure and PRZ identification, gives traders a disciplined approach to spotting bullish reversals in markets, particularly in forex, cryptocurrency, and stock trading.
 Bullish Pattern in  COINBASE:BTCUSD :
  
🟣 Bearish ABCD Pattern 
The bearish ABCD pattern is a harmonic structure that indicates a potential reversal zone (PRZ) where price may shift downward after an initial upward movement. This pattern consists of four main points A, B, C, and D. In a bearish ABCD, the AB and CD waves move upward, while the BC wave acts as a corrective wave in the opposite, downward direction. This reversal zone (PRZ) can be identified with specific Fibonacci ratios.
To identify a bearish ABCD pattern, start by observing the AB wave, which forms as an upward price movement. The BC wave, which follows, typically retraces between 0.382 to 0.886 of the AB wave. This retracement indicates how far the correction goes and sets the foundation for the next wave. 
Finally, the CD wave extends from point C to reach point D with a Fibonacci extension of approximately 1.13 to 2.618 of the BC wave. Point D represents the PRZ where the potential reversal may occur, making it a critical area for traders to consider short positions.
Once point D in the bearish ABCD pattern is reached, traders can anticipate a downward price movement. At this potential reversal zone (PRZ), traders often wait for additional bearish signals or candlestick patterns, such as engulfing or evening star formations, to confirm the price reversal. 
This confirmation around the PRZ enhances the accuracy of the entry point for a bearish position. Setting a stop loss slightly above point D can help manage risk if the price doesn’t reverse as anticipated. The ABCD pattern, with its reliance on Fibonacci ratios and clearly defined points, offers a strategic approach for traders looking to capitalize on potential bearish reversals in financial markets, including forex, stocks, and cryptocurrencies.
 Bearish Pattern in  OANDA:XAUUSD   :
  
🔵 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 Forma t: 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 ABCD harmonic pattern offers a structured approach in technical analysis, helping traders accurately identify potential reversal zones (PRZ) where price movements may shift direction. By leveraging the relationships between points A, B, C, and D, alongside specific Fibonacci ratios, traders can better anticipate points of market reversal and make more informed decisions.
Both the bearish and bullish ABCD patterns enable traders to pinpoint ideal entry points that align with anticipated market shifts. In a bearish ABCD, point D within the PRZ often signals a downward trend reversal, while in a bullish ABCD, this same point typically suggests an upward reversal. The adaptability of the ABCD pattern across different markets, such as forex, stocks, and cryptocurrencies, further highlights its utility and reliability.
Integrating the ABCD pattern into a trading strategy provides a methodical and calculated approach to entry and exit decisions. With accurate application of Fibonacci ratios and confirmation of the PRZ, traders can enhance their trading precision, reduce risks, and boost overall performance. The ABCD harmonic pattern remains a valuable resource for traders aiming to leverage structured patterns for consistent results in their technical analysis.
5-0 Harmonic Pattern [TradingFinder] 0XABCD 50 Harmonic Detector🔵 Introduction 
Harmonic patterns are a powerful tool in technical analysis, widely used to detect reversal points and trend changes. Among these, the 5-0 Harmonic Pattern stands out due to its reliance on specific Fibonacci ratios—1.13, 1.618, 2.24, and 0.45 to 0.55—anchored at points 0, X, A, B, C, and D. This pattern provides a structured approach for identifying critical buy and sell points, helping traders achieve optimal entry and exit levels in volatile markets.
This 5-0 Harmonic Pattern indicator automatically detects and marks bullish and bearish formations on the chart, offering precise trading signals based on established harmonic ratios. With its dynamic signals, the 5-0 pattern enables traders to anticipate market movements and capitalize on favorable price trends. 
Especially in fast-moving markets, harmonic patterns, particularly the 5-0 Harmonic Pattern, equip traders with an essential framework for identifying reversal opportunities and refining their trading strategies.
 Bullish 5-0 Pattern : 
  
 Bearish 5-0 Pattern : 
  
🔵 How to Use 
The 5-0 Harmonic Pattern indicator is designed to automatically mark the key levels of the harmonic structure: 0, X, A, B, C, and D. By doing so, it detects both bullish and bearish patterns and helps traders recognize optimal entry and exit points. 
Formed through specific Fibonacci levels, this pattern signals potential shifts in trend direction, giving traders critical insights for managing entries and exits effectively. The tool proves valuable in high-volatility settings, enabling traders to leverage these signals for refined decision-making.
🟣 Bullish 5-0 Pattern 
A bullish 5-0 pattern materializes when Fibonacci levels indicate a potential price reversal to the upside. With points 0, X, A, B, C, and D in alignment, the indicator highlights this upward momentum by displaying a green arrow as a buy signal on the chart. This marking provides a clear entry point, indicating that prices are likely to rise, making it a prime moment for traders to enter long positions.
Additionally, the bullish 5-0 pattern is equipped with tools for traders to set stop-loss and take-profit points based on harmonic lines within the pattern, which represent support and resistance levels. Using these dynamic points, traders can create a more effective risk-reward setup while following the bullish signals in a standalone harmonic strategy.
  
🟣 Bearish 5-0 Pattern 
The bearish 5-0 pattern functions similarly but signals a likely downturn. This pattern emerges when Fibonacci ratios align at points 0, X, A, B, C, and D, predicting a reversal downward. The indicator generates a sell signal, marked by a red arrow, prompting traders to exit long positions or initiate short trades to capitalize on falling prices.
Traders can utilize this bearish pattern for defining exit strategies and setting key levels for stop-loss and take-profit orders. The bearish 5-0 pattern enhances traders’ abilities to gauge critical price levels and manage trade risk effectively, especially in volatile markets. For traders focused on profiting from downward trends, this indicator serves as a powerful tool for timely entries and exits.
  
🔵 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 Forma t: 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 5-0 Harmonic Pattern indicator serves as a robust solution for technical analysts and traders looking to pinpoint market reversal points. By automatically recognizing 5-0 patterns and generating buy and sell signals based on Fibonacci ratios, this tool supports precise trend analysis and entry/exit timing. The indicator’s adjustable alerts, color themes, and pattern toggles allow for comprehensive customization, ensuring alignment with individual trading strategies.
Harmonic patterns, especially the 5-0 Harmonic Pattern, guide traders in identifying high-accuracy entry and exit points, thus aiding in more informed trading decisions. By combining Fibonacci ratio analysis with real-time signal updates, this indicator provides a well-rounded approach for risk management and capitalizing on trading opportunities. Professional traders can harness this tool to enhance technical analysis precision and capitalize on price trends effectively, maximizing profitability in both bullish and bearish markets.
Custom Time Range HighlighterCustom Time Range Highlighter
 
This versatile indicator allows traders to  highlight specific time ranges  on their charts, accommodating users worldwide by supporting customizable UTC offsets. Traders can define two distinct time ranges, setting start and end hours in their local time zone. 
A  toggle option  enables the display of  highlights  for  today only , ensuring focus on current trading conditions. 
Ideal for day traders and those following specific market sessions, this tool enhances visibility of active trading periods and aids in effective trade management.
Shark Harmonic Pattern [TradingFinder] Shark Detector Indicator🔵 Introduction 
The Shark harmonic pattern, first introduced by Scott Carney in 2011, is a recognized tool in technical analysis. Since its inception, it has been widely adopted by traders as an essential market analysis tool.
Due to its complexity, the Shark pattern can be challenging for novice traders. Therefore, we have developed the Harmonic Pattern Indicator to help analysts and traders easily identify these patterns.
🟣 Understanding the Types of Shark Pattern 
In technical analysis, the Shark harmonic pattern forms at the end of trends and is categorized into two types: Bullish and Bearish Shark Patterns.
 Bullish Shark Pattern : This pattern appears at the end of a downtrend, indicating a potential reversal to an uptrend. Traders can use this pattern to identify buy entry points. The image below illustrates the core components of the Bullish Shark Pattern.
  
 Bearish Shark Pattern : Conversely, the Bearish Shark Pattern forms at the end of an uptrend, signaling a possible reversal to a downtrend. This pattern prompts traders to shift their positions from buying to selling. The image below showcases the characteristics of the Bearish Shark Pattern.
  
🔵 How to Use 
🟣 Trading with the Bullish Shark Pattern 
The Bullish Shark Pattern acts as a reversal pattern, helping traders identify the end of a downtrend and the beginning of an uptrend. It consists of five key points that indicate alternating bullish and bearish movements.
Upon the complete formation of this pattern, traders can look for opportunities to enter buy trades. To manage risk effectively, it is advisable to set a stop-loss below the lowest price point within the pattern.
  
🟣 Trading with the Bearish Shark Pattern 
Similarly, the Bearish Shark Pattern functions as a reversal pattern but in the opposite direction. It helps traders identify the end of an uptrend and the onset of a downtrend. 
After the pattern fully forms, traders can seek sell entry opportunities. As with the bullish pattern, placing a stop-loss above the highest price point within the pattern is recommended for risk management.
  
🔵 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 Shark harmonic pattern is a potent analytical tool in technical analysis that aids traders in identifying critical reversal points in financial markets. Whether in a bullish or bearish context, this pattern provides clear trend change signals, allowing traders to enter trades with greater precision and optimize their strategies. 
However, as with all analytical methods, it is essential to supplement the Shark pattern with additional analyses and strict risk management to avoid potential losses. Incorporating this pattern into a comprehensive trading strategy can lead to better trade outcomes and more opportunities for success
Reversal Candlestick Structure [LuxAlgo]The Reversal Candlestick Structure indicator detects multiple candlestick patterns occurring when trends are most likely to experience a reversal in real-time. The reversal detection method includes various settings allowing users to adjust the reversal detection algorithm more precisely.
A dashboard showing the percentage of patterns detected as reversals is also included.
🔶  USAGE 
  
Candlestick patterns are ubiquitous to technical analysts, allowing them to detect trend continuations, reversals, and indecision.
The proposed tool effectively detects reversals by using the confluence between candlestick patterns and a reversal detection method based on the stochastic oscillator, acting as a filter for the patterns. If a candlestick pattern occurs while conditions suggest a potential reversal then the pattern is highlighted.
  
The displayed candle coloring allows users to observe the reversal detection method, with colored candles indicating potential reversals.
  
Users wanting to detect longer-term reversals can use a higher "Trend Length" setting, this can however lead to an increased amount of displayed candlestick patterns. 
  
To prevent false positives users also have control over a "Threshold" setting in a range between (0, 100), with values closer to 100 preventing candlesticks from being detected at the start of trends.
The "Warmup Length" serves a similar purpose, and aims to prevent sudden moves to be classified as reversals. Higher values of this setting will require trends to be established for a longer period of time for reversal conditions to be detected.
🔹 Dashboard 
  
To evaluate the role of individual candlestick patterns as potential reversal signals relative to the proposed reversal detection method, a dashboard displaying the percentage of candlestick patterns displayed (that occur when a potential reversal is detected) over the total amount detected.
Hovering on the dashboard cells of the "Reversal %" column allows displaying the total amount of patterns detected.
🔶  CANDLESTICKS PATTERNS 
This tool detects 16 popular candlestick patterns, each listed in the sub-sections below.
🔹 Bullish Patterns 
 
 Hammer - A bullish reversal pattern that forms after a decline, characterized by a small body at the upper end of the trading range and a long lower shadow.
 Inverted Hammer - A bullish reversal pattern that forms after a downtrend, featuring a small body at the lower end of the trading range and a long upper shadow.
 Bullish Engulfing - A bullish reversal pattern where a small bearish candlestick is followed by a larger bullish candlestick that completely engulfs the previous candle.
 Rising 3 - A bullish continuation pattern that consists of a long bullish candlestick followed by three smaller bearish candlesticks and then another long bullish candlestick.
 3 White Soldiers - A bullish reversal pattern consisting of three consecutive long bullish candlesticks, each opening within the previous candle's body and closing higher.
 Morning Star - A bullish reversal pattern made up of three candlesticks: a long bearish candlestick, followed by a short candlestick, and then a long bullish candlestick.
 Bullish Harami - A bullish reversal pattern where a small bullish candlestick is completely within a previous larger bearish candlestick.
 Tweezer Bottom - A bullish reversal pattern identified by an initial bullish candle, followed by a bearish candle, both having equal lows.
 
🔹 Bearish Patterns 
 
 Hanging Man - A bearish reversal pattern that forms after an uptrend, characterized by a small body at the upper end of the trading range and a long lower shadow.
 Shooting Star - A bearish reversal pattern that forms after an uptrend, featuring a small body at the lower end of the trading range and a long upper shadow.
 Bearish Engulfing - A bearish reversal pattern where a small bullish candlestick is followed by a larger bearish candlestick that completely engulfs the previous candle.
 Falling 3 - A bearish continuation pattern that consists of a long bearish candlestick followed by three smaller bullish candlesticks and then another long bearish candlestick.
 3 Black Crows - A bearish reversal pattern consisting of three consecutive long bearish candlesticks, each opening within the previous candle's body and closing lower.
 Evening Star - A bearish reversal pattern made up of three candlesticks: a long bullish candlestick, followed by a short candlestick, and then a long bearish candlestick.
 Bearish Harami - A bearish reversal pattern where a small bearish candlestick is completely within a previous larger bullish candlestick.
 Tweezer Top - A bearish reversal pattern is identified by an initial bullish candle, followed by a bearish candle, both having equal highs."
 
🔶  SETTINGS 
🔹 Patterns 
 
 Group including toggles for each of the supported candlestick patterns. Enabled toggles will allow detection of the associated candlestick pattern.
 
🔹 Reversal Detection 
 
 Trend Length: Determines the sensitivity of the reversal detection method to shorter-term variation, with higher values returning a detection method more sensitive to longer-term trends.
 Threshold: Determines how easy it is for the reversal detection method to consider a trend at an extreme point.
 Warmup Length: Warmup period in the reversal detection method, longer values will require a longer-term trend to detect potential reversals. 
 
🔹 Style 
 
 Color Candles: Enable candle coloring on the user chart based on the reversal detection method.
 Use Gradient: Use a gradient as candle coloring.
 Label Size: Size of the labels displaying the detected candlesticks patterns.
 
🔹 Dashboard 
 
 Show Dashboard: Display the dashboard on the user chart when enabled.
 Location: Dashboard location on the user chart.
 Size: Size of the displayed dashboard.
Flags With Measured Move [QuantVue]Flags with Measured Moves  is a technical analysis tool that identifies bull flags and provides a measured move target.
A bull flag is a continuation pattern that occurs within the context of a general uptrend. It represents a pause or small consolidation before the price resumes its upward movement.
A bull flag consists of two sections: the flagpole and the flag.
The flagpole is the initial upward movement that occurs before the flag forms.
The flag forms as the price consolidates after the initial uptrend. During this phase, the price tends to drift downward or sideways, ideally with declining volume.
  
Once the flag has put in a low, the initial range of thrust is added to the flag low to form the measured move target.
  
Every element of the flag is customizable by the trader, including the size and length of the prior uptrend and the minimum and maximum flag depth and length.
The indicator also includes alerts for when new flags are formed, when a breakout from the flag occurs, and when the measured move target is reached.
By default, the indicator settings are set for use on a daily timeframe. If using the indicator on an intraday timeframe, you will need to adjust the settings.
Give this indicator a BOOST and COMMENT your thoughts!
We hope you enjoy.
Cheers!
Seasonality Widget [LuxAlgo]The Seasonality Widget tool allows users to easily visualize seasonal trends from various data sources.
Users can select different levels of granularity as well as different statistics to express seasonal trends.
🔶  USAGE 
  
Seasonality allows us to observe general trends occurring at regular intervals. These intervals can be user-selected from the granularity setting and determine how the data is grouped, these include:
 
 Hour
 Day Of Week
 Day Of Month
 Month
 Day Of Year
 
  
The above seasonal chart shows the BTCUSD seasonal price change for every hour of the day, that is the average price change taken for every specific hour. This allows us to obtain an estimate of the expected price move at specific hours of the day.
Users can select when data should start being collected using the "From Date" setting, any data before the selected date will not be included in the calculation of the Seasonality Widget.
🔹 Data To Analyze 
  
The Seasonality Widget can return the seasonality for the following data:
 
 Price Change
 
Closing price minus the previous closing price.
 
 Price Change (%)
 
Closing price minus the previous closing price, divided by the 
previous closing price, then multiplied by 100.
 
 Price Change (Sign)
 
Sign of the price change (-1 for negative change, 1 for positive change), normalized in a range (0, 100). Values above 50 suggest more positive changes on average.
 
 Range
 
High price minus low price.
 
 Price - SMA
 
Price minus its simple moving average. Users can select the SMA period.
 
 Volume
 
Amount of contracts traded. Allow users to see which periods are generally the most /least liquid.
 
 Volume - SMA
 
Volume minus its simple moving average. Users can select the SMA period.
🔹 Filter 
In addition to the "From Date" threshold users can exclude data from specific periods of time, potentially removing outliers in the final results.
The period type can be specified in the "Filter Granularity" setting. The exact time to exclude can then be specified in the "Numerical Filter Input" setting, multiple values are supported and should be comma separated.
  
For example, if we want to exclude the entire 2008 period we can simply select "Year" as filter granularity, then input 2008 in the "Numerical Filter Input" setting.
Do note that "Sunday" uses the value 1 as a day of the week.
🔶  DETAILS 
🔹 Supported Statistics 
Users can apply different statistics to the grouped data to process. These include:
 
 Mean
 Median
 Max
 Min
 Max-Min Average
 
  
Using the median allows for obtaining a measure more robust to outliers and potentially more representative of the actual central tendency of the data.
Max and Min do not express a general tendency but allow obtaining information on the highest/lowest value of the analyzed data for specific periods.
🔶  SETTINGS 
 
 Granularity: Periods used to group data.
 From Data: Starting point where data starts being collected
 
🔹 Data 
 
 Analyze: Specific data to be processed by the seasonality widget.
 SMA Length: Period of the simple moving average used for "Price - SMA" and "Volume - SMA" options in "Analyze".
 Statistic: Statistic applied to the grouped data.
 
🔹 Filter 
 
 Filter Granularity: Period type to exclude in the processed data.
 Numerical Filter Input: Determines which of the selected hour/day of week/day of month/month/year to exclude depending on the selected Filter Granularity. Only numerical inputs can be provided. Multiple values are supported and must be comma-separated.
  
TimeSeriesGrammianAngularFieldLibrary   "TimeSeriesGrammianAngularField" 
provides Grammian angular field and associated utility functions.
___
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
www.researchgate.net
 method normalize(data, a, b) 
  Normalize the series to a optional range, usualy within `(-1, 1)` or `(0, 1)`.
  Namespace types: array
  Parameters:
     data (array) : Sample data to normalize.
     a (float) : Minimum target range value, `default=-1.0`.
     b (float) : Minimum target range value, `default= 1.0`.
  Returns: Normalized array within new range.
___
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
 normalize_series(source, length, a, b) 
  Normalize the series to a optional range, usualy within `(-1, 1)` or `(0, 1)`.\
*Note that this may provide a different result than the array version due to rolling range*.
  Parameters:
     source (float) : Series to normalize.
     length (int) : Number of bars to sample the range.
     a (float) : Minimum target range value, `default=-1.0`.
     b (float) : Minimum target range value, `default= 1.0`.
  Returns: Normalized series within new range.
 method polar(data) 
  Turns a normalized sample array into polar coordinates.
  Namespace types: array
  Parameters:
     data (array) : Sampled data values.
  Returns: Converted array into polar coordinates.
 polar_series(source) 
  Turns a normalized series into polar coordinates.
  Parameters:
     source (float) : Source series.
  Returns: Converted series into polar coordinates.
 method gasf(data) 
  Gramian Angular Summation Field *`GASF`*.
  Namespace types: array
  Parameters:
     data (array) : Sampled data values.
  Returns: Matrix with *`GASF`* values.
 method gasf_id(data) 
  Trig. identity of Gramian Angular Summation Field *`GASF`*.
  Namespace types: array
  Parameters:
     data (array) : Sampled data values.
  Returns: Matrix with *`GASF`* values.
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
 method gadf(data) 
  Gramian Angular Difference Field *`GADF`*.
  Namespace types: array
  Parameters:
     data (array) : Sampled data values.
  Returns: Matrix with *`GADF`* values.
 method gadf_id(data) 
  Trig. identity of Gramian Angular Difference Field *`GADF`*.
  Namespace types: array
  Parameters:
     data (array) : Sampled data values.
  Returns: Matrix with *`GADF`* values.
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
Fibonacci Timing Pattern IIThe Fibonacci Timing Pattern II is a price-based counter that seeks to determine medium-term reversals in price action. It is based on the following set of conditions:
* For a bullish Fibonacci timing signal II: The current close must be lower than the close prices from one and two periods ago. Simultaneously, the close price from two periods ago must be lower than the close price from three periods ago, and the close price from three periods ago must be lower than the close price from five periods ago. The Fibonacci sequence continues until the close price from thirty four periods ago which must be above the close price from fifty five periods ago.
* For a bearish Fibonacci timing signal II: The current close must be higher than the close prices from one and two periods ago. Simultaneously, the close price from two periods ago must be higher than the close price from three periods ago, and the close price from three periods ago must be higher than the close price from five periods ago. The Fibonacci sequence continues until the close price from thirty four periods ago which must be lower the close price from fifty five periods ago.
The signals of the pattern are ideally used in a sideways market or used in tandem with the trend (bullish signals are taken in a bullish market and bearish signals are taken in a bearish market).
Dip & Rip Patterns - The Quant Science🇺🇸
 GENERAL OVERVIEW 
This indicator detects Dip and Rip patterns by quickly highlighting them on the chart.
These patterns have become popular during the pandemic period mainly in the stock, ETF and cryptocurrency markets on which traders use two interesting strategies: 
 
 Buy The Dip
 Sell The Rip
 
Before going into the merits of this technical indicator, let's understand what these two patterns mean and what they identify precisely. 
 Rip (Rise In Price) : wants to identify a market condition in which the price rises rapidly, for example from $100 to $110 in a few minutes or hours. 
 Dip (Drop In Price) : wants to identify a market condition in which the price drops rapidly, for example from $100 to $90 in a few minutes or hours. 
 HOW TO USE 
For a better user experience, we recommend choosing a neutral colour for the candles while analysing with this indicator. You can quickly change the colour in  Chart Settings > Symbol > Candles .
  
Depending on the configuration set by the user, the indicator will show Dip (Dip In Price) patterns in red and Rip (Rise In Price) patterns in green.
  
When the pattern forms, a circle will be displayed and a vertical line will be coloured on the chart along with the body of the candle. The user will then be able to quickly and easily track the configured market conditions.
In this example, we decided to use a 4H timeframe on the BTC/USDT pair (Binance). 
Set in the user interface: 
 Period:  20 
 Dip (%):  -25
 Rip (%):  20 
Price falls by 25% or more in 80 hours (Dip Pattern). 
  
Price rise by 25% or more in 80 hours (Rip Pattern). 
  
The user can easily configure the parameters via the user interface in the Inputs section (A) and change the indicator design in the Properties section (B).
  
🇮🇹 
 PANORAMICA GENERALE 
Questo indicatore rileva i Dip e Rip patterns evidenziandoli velocemente sul grafico.
Questi patterns sono diventati famosi durante il periodo pandemico principalmente nel mercato delle azioni, ETF e Criptovalute su cui i trader utilizzano due interessanti strategie: 
 
 Buy The Dip 
 Sell The Rip
 
Prima di entrare nel merito di questo indicatore tecnico, comprendiamo il significato di questi due pattern e cosa identificano precisamente. 
 Rip (Rise In Price) : vuole identificare una condizione di mercato in cui il prezzo sale rapidamente, per esempio passando da 100$ a 110$ in pochi minuti o poche ore. 
 Dip (Drop In Price)  : vuole identificare una condizione di mercato in cui il prezzo cala rapidamente, per esempio passando da 100$ a 90$ in pochi minuti o poche ore. 
 UTILIZZO 
Per una migliore esperienza utente consigliamo di scegliere un colore neutro per le candele mentre si analizza con questo indicatore. Puoi cambiare velocemente il colore in  Chart Settings > Symbol > Candles .
  
In base alla configurazione impostata dall'utente l'indicatore mostrerà in rosso i pattern Dip (Dip In Price) e in verde i pattern Rip (Rise In Price).
  
Quando il pattern si forma verrà visualizzato un cerchio e una linea verticale sul grafico che sarà colorata insieme al corpo della candela. L'utente quindi potrà tracciare facilmente e velocemente le condizioni di mercato configurate.
In questo esempio abbiamo deciso di utilizzare un timeframe 4H con l'obbiettivo di ricercare i patterns sul pair BTC/USDT (Binance). 
Impostiamo nell'interfaccia utente: 
 Period:  20 
 Dip (%):  -25
 Rip (%):  20 
Il prezzo diminuisce del 25% o più in 80 ore (Dip Pattern). 
  
Il prezzo aumenta del 25% o più in 80 ore (Rip Pattern). 
  
L' utente può configurare facilmente i parametri attraverso l'interfaccia utente nella sezione Inputs (A) e modificare il design dell'indicatore nella sezione Properties (B).
 
YinYang RSI Volume Trend StrategyThere are many strategies that use RSI or Volume but very few that take advantage of how useful and important the two of them combined are. This strategy uses the Highs and Lows with Volume and RSI weighted calculations on top of them. You may be wondering how much of an impact Volume and RSI can have on the prices; the answer is a lot and we will discuss those with plenty of examples below, but first…
How does this strategy work?
It’s simple really, when the purchase source crosses above the inner low band (red) it creates a Buy or Long. This long has a Trailing Stop Loss band (the outer low band that's also red) that can be adjusted in the Settings. The Stop Loss is based on a % of the inner low band’s price and by default it is 0.1% lower than the inner band’s price. This Stop Loss is not only a stop loss but it can also act as a Purchase Available location.
  
You can get back into a trade after a stop loss / take profit has been hit when your Reset Purchase Availability After condition has been met. This can either be at Stop Loss, Entry or None. 
  
It is advised to allow it to reset in case the stop loss was a fake out but the call was right. Sometimes it may trigger stop loss multiple times in a row, but you don’t lose much on stop loss and you gain lots when the call is right.
  
The Take Profit location is the basis line (white). Take Profit occurs when the Exit Source (close, open, high, low or other) crosses the basis line and then on a different bar the Exit Source crosses back over the basis line. For example, if it was a Long and the bar’s Exit Source closed above the basis line, and then 2 bars later its Exit Source closed below the basis line, Take Profit would occur. You can disable Take Profit in Settings, but it is very useful as many times the price will cross the Basis and then correct back rather than making it all the way to the opposing zone.
   
Longs:
If for instance your Long doesn’t need to Take Profit and instead reaches the top zone, it will close the position when it crosses above the inner top line (green). 
Please note you can change the Exit Source too which is what source (close, open, high, low) it uses to end the trades.
  
The Shorts work the same way as the Long but just opposite, they start when the purchase source crosses under the inner upper band (green).
  
Shorts:
Shorts take profit when it crosses under the basis line and then crosses back.
  
Shorts will Stop loss when their outer upper band (green) is crossed with the Exit Source.
  
Short trades are completed and closed when its Exit Source crosses under the inner low red band.
  
So, now that you understand how the strategy works, let’s discuss why this strategy works and how it is profitable.
First we will discuss Volume as we deem it plays a much bigger role overall and in our strategy:
As I’m sure many of you know, Volume plays a huge factor in how much something moves, but it also plays a role in the strength of the movement. For instance, let’s look at two scenarios: 
 
 Bitcoin’s price goes up $1000 in 1 Day but the Volume was only 10 million
 Bitcoin’s price goes up $200 in 1 Day but the Volume was 40 million
 
If you were to only look at the price, you’d say #1 was more important because the price moved x5 the amount as #2, but once you factor in the volume, you know this is not true. The reason why Volume plays such a huge role in Price movement is because it shows there is a large Limit Order battle going on. It means that both Bears and Bulls believe that price is a good time to Buy and Sell. This creates a strong Support and Resistance price point in this location. If we look at scenario #2, when there is high volume, especially if it is drastically larger than the average volume Bitcoin was displaying recently, what can we decipher from this? Well, the biggest take away is that the Bull’s won the battle, and that likely when that happens we will see bullish movement continuing to happen as most of the Bears Limit Orders have been fulfilled. Whereas with #2, when large price movement happens and Bitcoin goes up $1000 with low volume what can we deduce? The main takeaway is that Bull’s pressured the price up with Market Orders where they purchased the best available price, also what this means is there were very few people who were wanting to sell. This generally dictates that Whale Limit orders for Sells/Shorts are much higher up and theres room for movement, but it also means there is likely a whale that is ready to dump and crash it back down.
You may be wondering, what did this example have to do with YinYang RSI Volume Trend Strategy? Well the reason we’ve discussed this is because we use Volume multiple times to apply multiplications in our calculations to add large weight to the price when there is lots of volume (this is applied both positively and negatively). For instance, if the price drops a little and there is high volume, our strategy will move its bounds MUCH lower than the price actually dropped, and if there was low volume but the price dropped A LOT, our strategy will only move its bounds a little. We believe this reflects higher levels of price accuracy than just price alone based on the examples described above.
Don’t believe us? 
Here is with Volume NOT factored in (VWMA = SMA and we remove our Volume Filter calculation):
  
Which produced -$2880 Profit
Here is with our Volume factored in:
  
Which produced $553,000 (55.3%)
As you can see, we wen’t from $-2800 profit with volume not factored to $553,000 with volume factored. That's quite a big difference! (Please note previous success does not predict future success we are simply displaying the $ amounts as example).
Now how about RSI and why does it matter in this strategy?
As I’m sure most of you are aware, RSI is one of the leading indicators used in trading. For this reason we figured it would only make sense to incorporate it into our calculations. We fiddled with RSI for quite awhile and sometimes what logically seems to be the right way to use it isn’t. Now, because of this, our RSI calculation is a little odd, but basically what we’re doing is we calculate the RSI, then turn it into a percentage (between 0-1)  that can easily be multiplied to the price point we need. The price point we use is the difference between our high purchase zone and our low purchase zone. This allows us to see how much price movement there is between zones. We multiply our zone size with our RSI multiplication and we get the amount we will add +/- to our basis line (white line). This officially creates the NEW high and low purchase zones that we are actually using and displaying in our trades.
If you found that confusing, here are some examples to why it is an important calculation for this strategy:
Before RSI factored in:
  
Which produced 27.8% Profit
After RSI factored in:
  
Which produced 553% Profit
As you can see, the RSI makes not only the purchase zones more accurate, but it also greatly increases the profit the strategy is able to make. It also helps ensure an relatively linear profit slope so you know it is reliable with its trades.
This strategy can work on pretty much anything, but you should tweak the values a bit for each pair you are trading it with for best results.
We hope you can find some use out of this simple but effective strategy, if you have any questions, comments or concerns please let us know.
HAPPY TRADING!
The Next Pivot [Kioseff Trading]Hello!
This script "The Next Pivot" uses various similarity measures to compare historical price sequences to the current price sequence!
 Features 
 
 Find the most similar price sequence up to 100 bars from the current bar
 Forecast price path up to 250 bars
 Forecast ZigZag up to 250 bars 
 Spearmen 
 Pearson    
 Absolute Difference
 Cosine Similarity
 Mean Squared Error
 Kendall
  Forecasted linear regression channel
 
  
The image above shows/explains some of the indicator's capabilities!
  
The image above highlights the projected zig zag (pivots) pattern!
Colors are customizable (:
  
Additionally, you can plot a forecasted LinReg channel.
Should load times permit it, the script  can  search all bar history for a correlating sequence. This won't always be possible, contingent on the forecast length, correlation length, and the number of bars on the chart.
 Reasonable Assessment  
The script uses various similarity measures to find the "most similar" price sequence to what's currently happening. Once found, the subsequent price move (to the most similar sequence) is recorded and projected forward. 
So, 
1: Script finds most similar price sequence
2: Script takes what happened after and projects forward 
While this may be useful, the projection is simply the reaction to a possible one-off "similarity" to what's currently happening. Random fluctuations are likely and, if occurring, similarities between the current price sequence and the "most similar" sequence are plausibly coincidental. 
That said, if you have any ideas on cool features to add please let me know! 
Thank you (:
Autocorrelation - The Quant ScienceAutocorrelation - The Quant Science  it is an indicator developed to quickly calculate the autocorrelation of a historical series. The objective of this indicator is to plot the autocorrelation values and highlight market moments where the value is positive and exceeds the attention threshold.
This indicator can be used for manual analysis when a trader needs to search for new price patterns within the historical series or to create complex formulas in estimating future prices.
  
  
 What is autocorrelation? 
Autocorrelation in trading is a statistical measure used to determine the presence of a relationship or pattern of dependence between values in a financial time series over time. It represents the correlation of past values in a series with its future values. In other words, autocorrelation in trading aims to identify if there are systematic relationships between the past prices or returns of a security or market and its future prices or returns. This analysis can be helpful in identifying patterns or trends that can be leveraged for informed trading decisions. The presence of autocorrelation may suggest that market prices or returns follow a certain pattern or trend over time.
 Limitations of the model 
It is important to note that autocorrelation does not necessarily imply a causal relationship between past and future values. Other variables or market factors may influence the dynamics of prices or returns, and therefore autocorrelation could be merely a random coincidence. Therefore, it is essential to carefully evaluate the results of autocorrelation analysis along with other information and trading strategies to make informed decisions.
 How to use 
The usage is very simple, you just need to add it to the current chart to activate the indicator.
From the user interface, you can manage two important features:
 1. Lenght:  the delay period applied to the historical series during the autocorrelation calculation can be managed from the user interface. By default, it is set to 20, which means that the autocorrelation ratio within the historical series is calculated with a delay of 20 bars.
  
  
 2. Threshold:  the threshold value that the autocorrelation level must meet can be managed from the user interface. By default, it is set to 0.50, which means that the autocorrelation value must be higher than this threshold to be considered valid and displayed on the chart.
  
 3. Bar color:  the color used to display the autocorrelation data and highlight the bars when autocorrelation is valid can be managed from the user interface.
  
 To set up the chart 
We recommend disabling the 'wick' and 'border' of the candlesticks from the chart settings for a high-quality user experience.
 






















