Overview The CS Patterns indicator is designed to identify and highlight various candlestick patterns on a trading chart. Candlestick patterns are a crucial tool for traders as they help in predicting market movements and potential reversals. This indicator includes single, double, and triple candlestick patterns without revealing the source code, making it an ideal tool for traders who want to utilize advanced pattern recognition while keeping the script proprietary.
Candlestick Patterns Included Single Candlestick Patterns
Bullish Hammer:
Found at the bottom of a downtrend.
Features a small body, long lower shadow, and little to no upper shadow.
Indicates potential reversal to an uptrend.
Bearish Hanging Man:
Found at the top of an uptrend.
Similar structure to the Bullish Hammer but indicates a potential reversal to a downtrend.
Bullish Inverted Hammer:
Found at the bottom of a downtrend.
Features a small body, long upper shadow, and little to no lower shadow.
Suggests a potential reversal to an uptrend.
Bearish Shooting Star:
Found at the top of an uptrend.
Indicates a potential reversal to a downtrend.
Dragonfly Doji:
Small or non-existent upper shadow and long lower shadow.
Indicates a potential reversal when found at the bottom of a trend.
Gravestone Doji:
Long upper shadow and small or non-existent lower shadow.
Indicates a potential reversal when found at the top of a trend.
Standard Doji:
Very small body, indicates indecision in the market.
Can signal reversals when found at the tops or bottoms of trends.
Long-Legged Doji:
Long upper and lower shadows with a small body.
Indicates a potential market reversal.
Double Candlestick Patterns
Bullish Engulfing:
A smaller bearish candle followed by a larger bullish candle that engulfs it.
Indicates a potential reversal to an uptrend.
Bearish Engulfing:
A smaller bullish candle followed by a larger bearish candle that engulfs it.
Indicates a potential reversal to a downtrend.
Bullish Harami:
A large bearish candle followed by a smaller bullish candle within its range.
Indicates a potential reversal to an uptrend.
Bearish Harami:
A large bullish candle followed by a smaller bearish candle within its range.
Indicates a potential reversal to a downtrend.
Bullish Piercing Line:
A bearish candle followed by a bullish candle that closes above the midpoint of the previous candle.
Indicates a potential reversal to an uptrend.
Bearish Dark Cloud Cover:
A bullish candle followed by a bearish candle that closes below the midpoint of the previous candle.
Indicates a potential reversal to a downtrend.
Bullish Inside Bar:
A smaller bullish or bearish candle completely within the range of the previous bearish candle.
Indicates a potential continuation or reversal to an uptrend.
Bearish Inside Bar:
A smaller bullish or bearish candle completely within the range of the previous bullish candle.
Indicates a potential continuation or reversal to a downtrend.
Triple Candlestick Patterns
Bullish Morning Star:
A bearish candle followed by a smaller-bodied candle (bullish or bearish), and then a larger bullish candle.
Indicates a potential reversal to an uptrend.
Bearish Evening Star:
A bullish candle followed by a smaller-bodied candle (bullish or bearish), and then a larger bearish candle.
Indicates a potential reversal to a downtrend.
How to Use? Adding the Indicator:
Open TradingView and go to the Pine Script Editor.
Copy and paste the provided code into a new script.
Save and add the script to your chart.
Interpreting the Signals:
The indicator will highlight the patterns on the chart with specific labels.
Use these visual cues to make informed trading decisions based on potential reversals or continuations indicated by the patterns.
Customizing the Settings:
The indicator allows for customization of various settings through input options.
Adjust these settings according to your trading strategy and preferences.
Release Notes
Indicator: CS Patterns
Description The "CS Patterns" indicator is a comprehensive tool for identifying various single, double, and triple candlestick patterns on a trading chart. This indicator is designed to help traders spot significant candlestick formations that can indicate potential market reversals or continuations. The indicator allows customization for pattern detection sensitivity and includes an optional look-back feature to consider historical price action.
Features Single Candlestick Patterns:
Bullish Hammer / Bearish Hanging Man: Identified by a small body, long lower shadow, and negligible upper shadow.
Bullish Inverted Hammer / Bearish Shooting Star: Characterized by a small body, long upper shadow, and negligible lower shadow.
Dragonfly Doji: Formed by a small body near the high of the candle with a long lower shadow.
Gravestone Doji: Formed by a small body near the low of the candle with a long upper shadow.
Standard Doji: A candle where the open and close are very close, indicating indecision.
Long-legged Doji: Similar to a Standard Doji but with long upper and lower shadows.
Double Candlestick Patterns:
Bullish Engulfing: A bullish candle that engulfs the previous bearish candle.
Bearish Engulfing: A bearish candle that engulfs the previous bullish candle.
Bullish Harami: A small bullish candle contained within the previous bearish candle.
Bearish Harami: A small bearish candle contained within the previous bullish candle.
Bullish Piercing Line: A bullish candle that closes above the midpoint of the previous bearish candle.
Bearish Dark Cloud Cover: A bearish candle that closes below the midpoint of the previous bullish candle.
Bullish Inside Bar: A bullish candle that is contained within the previous candle's range.
Bearish Inside Bar: A bearish candle that is contained within the previous candle's range.
Triple Candlestick Patterns:
Bullish Morning Star: A three-candle pattern where the first is bearish, the second has a small body (bullish or bearish), and the third is bullish, indicating a potential bullish reversal.
Bearish Evening Star: A three-candle pattern where the first is bullish, the second has a small body (bearish or bullish), and the third is bearish, indicating a potential bearish reversal.
Customizable Settings:
Enable Look-Back Feature: Option to enable or disable the look-back feature for pattern detection.
Number of Candles to Look Back: Defines the number of previous candles to consider for pattern detection (default is 20).
Inputs
Enable Look-Back Feature: Boolean input to enable or disable the look-back feature (default is true).
Number of Candles to Look Back: Integer input to set the number of candles to look back for pattern detection (default is 20).
Hammer / Hanging Man: Boolean input to show or hide the Hammer and Hanging Man patterns.
Upper Wick Thresh % (Hammer/Hanging Man): Float input to set the threshold for negligible upper wick percentage.
Inv Hammer / Shooting Star: Boolean input to show or hide the Inverted Hammer and Shooting Star patterns.
Lower Wick Thresh % (Inv Hammer/Shooting Star): Float input to set the threshold for negligible lower wick percentage.
Dragonfly Doji: Boolean input to show or hide the Dragonfly Doji pattern.
Upper Wick Thresh % (Dragonfly Doji): Float input to set the threshold for small upper wick percentage.
Show Gravestone Doji: Boolean input to show or hide the Gravestone Doji pattern.
Lower Wick Thresh % (Gravestone Doji): Float input to set the threshold for small lower wick percentage.
Show Standard Doji: Boolean input to show or hide the Standard Doji pattern.
Show Long-legged Doji: Boolean input to show or hide the Long-legged Doji pattern.
Bullish Engulfing: Boolean input to show or hide the Bullish Engulfing pattern.
Bearish Engulfing: Boolean input to show or hide the Bearish Engulfing pattern.
Bullish Harami: Boolean input to show or hide the Bullish Harami pattern.
Bearish Harami: Boolean input to show or hide the Bearish Harami pattern.
Bull Piercing Line: Boolean input to show or hide the Bullish Piercing Line pattern.
Bear Dark Cloud Cover: Boolean input to show or hide the Bearish Dark Cloud Cover pattern.
Bullish Morning Star: Boolean input to show or hide the Bullish Morning Star pattern.
Bearish Evening Star: Boolean input to show or hide the Bearish Evening Star pattern.
Bullish Inside Bar: Boolean input to show or hide the Bullish Inside Bar pattern.
Bearish Inside Bar: Boolean input to show or hide the Bearish Inside Bar pattern.
Plotting
Patterns are plotted with distinct labels and colors to indicate the type of pattern detected.
Bullish patterns are labeled and colored in shades of green.
Bearish patterns are labeled and colored in shades of red.
This indicator provides a powerful tool for traders to identify key candlestick patterns and make informed trading decisions based on historical price action. The customizable look-back feature adds flexibility, allowing users to adjust the sensitivity of pattern detection according to their trading strategy.
Release Notes
Summary of Script Updates: Look-Back Feature:
User Inputs: Added options to enable/disable look-back, set the look-back period, and show/hide high/low levels and labels.
Flexible Look-Back: Updated pattern detection to consider a variable look-back period (default 20 candles).
High/Low Display:
Calculations: Added calculations for the highest high and lowest low in the look-back period.
Dynamic Labels: Plots and deletes lines and labels for the highest high and lowest low based on user settings.
Pattern Detection:
Enhanced Logic: Updated all candlestick patterns to include look-back period confirmation and user-configurable settings.
These updates provide more flexibility and customization for traders, improving clarity in pattern detection and high/low levels within a specified look-back period.
Release Notes
Bullish and Bearish Engulfing Pattern Updates:
Bullish Engulfing:
Previous candle must be bearish; current candle must be bullish.
Current candle's open <= previous candle's close.
Current candle's close >= previous candle's open.
Added: Low of current or previous candle must be lower than previous N candles (if look-back enabled).
Bearish Engulfing:
Previous candle must be bullish; current candle must be bearish.
Current candle's open >= previous candle's close.
Current candle's close <= previous candle's open.
Added: High of current or previous candle must be higher than previous N candles (if look-back enabled).
These updates ensure stricter pattern validation and incorporate significant highs and lows when look-back is enabled.
Release Notes
Bullish Piercing Line and Bearish Dark Cloud Cover Patterns
Previous Version:
Bullish Piercing Line required the bullish candle to close above the midpoint of the previous bearish candle.
Bearish Dark Cloud Cover required the bearish candle to close below the midpoint of the previous bullish candle.
New Version:
Bullish Piercing Line now allows the close to be either above or below the midpoint if there is higher trading volume.
Bearish Dark Cloud Cover also allows the close to be either above or below the midpoint with higher trading volume.
Bullish Morning Star and Bearish Evening Star Patterns
Previous Version:
Bullish Morning Star required a bearish first candle, a small-bodied second candle, and a bullish third candle with specific open and close conditions.
Bearish Evening Star required a bullish first candle, a small-bodied second candle, and a bearish third candle with specific open and close conditions.
New Version:
Bullish Morning Star now includes variations like Dragonfly Doji, Gravestone Doji, Standard Doji, and Long-legged Doji for the second candle, with adjusted third candle conditions.
Bearish Evening Star also includes these variations for the second candle, with modified third candle conditions.
These updates make pattern detection more flexible and accurate by incorporating candlestick variations and adjusting conditions based on trading volume.
Release Notes
Functional Enhancements
Confirmation Candle Requirement:
Old Code: Directly plotted the pattern shape when the pattern was detected.
New Code: Plots the pattern shape only if the confirmation candle is valid (i.e., a bullish or bearish confirmation candle following the pattern). This change is applied to all patterns.
Pattern-Specific Changes for the Following Patterns:
Old Code: Plotted the shapes directly if the pattern was detected.
New Code: Plots the shapes only if the bullish confirmation candle or bearish confirmation candle is valid.
Summary The latest code version has introduced significant enhancements focused on validating patterns with confirmation candles before plotting shapes on the chart. This ensures that the patterns identified are more reliable and actionable.
Release Notes
Release Notes
New Enhancements and Bug Fixes Engulfing Candle Enhancement:
The Engulfing Candle pattern now requires the engulfing candle to have the lowest low or highest high compared to the previous candle. This change ensures more accurate pattern detection and better trading signals.
Morning and Evening Star Enhancement:
For the Morning Star pattern, the Doji candle must now have the lowest low within the three-candle formation.
For the Evening Star pattern, the Doji candle must have the highest high within the three-candle formation.
This adjustment improves the reliability of these patterns by ensuring key characteristics are met.
Bullish and Bearish Harami Pattern Correction:
Corrected the code for Bullish and Bearish Harami patterns. The body of the Harami candle must now be three times smaller than the Mother candle.
This correction ensures the Harami patterns are detected correctly, providing more precise trading signals.
I hope these updates enhance your trading experience and provide more accurate and actionable insights.
Release Notes
Release Notes: New Features:
Entry, Stoploss, and Target Settings:
Added new user inputs to show or hide Entry, Stoploss, and Target labels and lines. Users can now control the visibility of these elements separately.
*Enhancements:
Look-Back Settings:
Enabled or disabled look-back feature with the option to show or hide the highest high and lowest low lines and labels for the previous 20 candles.
Defined fixed look-back period of 20 candles instead of a user-defined input.
Pattern Confirmation:
Adjusted conditions for pattern confirmation by requiring that the confirmation candle is validated. This applies to all patterns including Bullish Morning Star, Bearish Evening Star, Bullish Piercing Line, Bearish Dark Cloud Cover, Bullish Hammer, Bearish Hanging Man, Bullish Engulfing, Bearish Engulfing, Bullish Harami, Bearish Harami, Bullish Inverted Hammer, Bearish Shooting Star, Standard Doji, Dragonfly Doji, Gravestone Doji, and Long-legged Doji.
New Input Groups and Fields:
Added a group for "Entry, Stoploss, and Target Settings" with inputs for reward ratio, showing or hiding entry, stoploss, and target labels and lines.
Added a new fixed look-back period (20 candles) instead of user-defined input.
Pattern Recognition Adjustments:
Enhanced conditions for pattern recognition and confirmation, ensuring validation only if the confirmation candle is valid.
Label and Line Handling:
Improved handling of labels and lines by adding conditions to show or hide them based on user inputs.
Added new functions to handle label and line plotting with custom offsets.
Bug Fixes: Minor Adjustments:
Fixed minor bugs related to label positions and plot shapes to ensure accurate and clear visualization of patterns on the chart.
Release Notes
Enhancements:
Customizable Colors:
You can now change the colors of Entry, Stoploss, and Target labels and lines, making your chart more personalized and easier to read.
Adjustable Label Positions:
Move Entry, Stoploss, and Target labels to your preferred position for better visibility and clarity.
20 Candles Lookback:
Re-enabled the 20 candles lookback feature, enhancing the script's ability to analyze past data for better pattern detection and trading decisions.
New Features: Highlight Entry Candles with Volume (EWV):
Entry candles with higher volume than the previous candle and crossing the Entry line are now highlighted in blue, making significant entry points easy to spot.
Renamed Piercing Line to Piercing Pattern (PP):
The Piercing Line pattern is now called Piercing Pattern (PP) for better clarity and understanding.
Expanded Engulfing and Harami Patterns:
Added variations to the Engulfing and Harami patterns, providing more comprehensive pattern detection for better market insights.
New Tweezer Bottom (TB) and Tweezer Top (TT) Patterns:
Added Tweezer Bottom and Tweezer Top patterns to the double candlestick patterns, helping you identify potential market reversals with more accuracy.
Bug Fixes:
General script optimizations and minor bug fixes to improve performance and reliability.
These updates make the CS Patterns indicator more powerful and user-friendly, helping you make smarter trading decisions.
Release Notes
New Features and Enhancements:
Stop Loss (SL) Buffer Points Input:
Added user input for specifying SL buffer points, allowing for greater flexibility in stop loss placement.
Target Calculation Update:
Targets are now calculated based on a fixed 1:1 risk-reward ratio, independent of the SL buffer points.
Enhanced Signal Settings:
Current Session Signals:
Option to show only signals from the current trading session.
Selective Signal Display:
Users can choose to display only Bullish Signals, only Bearish Signals, or both.
Improved Pattern Detection:
Enhanced logic for more accurate candlestick pattern detection and fixed previous bugs.
Bullish Engulfing Variation Pattern:
Added detection for the Bullish Engulfing Variation pattern.
How to Use the New Features:
Setting SL Buffer Points:
Enter your desired buffer value in the SL buffer points input field in the indicator settings.
Target Calculation:
Targets are automatically set based on a 1:1 risk-reward ratio.
Configuring Signal Settings:
Enable the option to display signals only for the current session.
Choose to display Bullish, Bearish, or both types of signals in the Signal Settings section.
Bullish Engulfing Variation Pattern:
Ensure the relevant settings are enabled to receive signals for the new Bullish Engulfing Variation pattern.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.