OPEN-SOURCE SCRIPT
Bullish-Bearish Candle Power

Bullish Bearish Candle Power
What Does This Code Do For You?
Saves you from the hassle of constantly scanning for candlestick patterns on the screen.
Measures whether price action is supported by volume.
Provides an emotion-free, mathematical momentum report.
Part 1: Measuring the Candle Anatomy
The code breaks down every new candlestick into precise components:
Candle Range: The difference between the highest and lowest price.
Body Size: The net difference between the open and close price.
Wicks (Upper and Lower): Shows how much the price was rejected at the top and bottom.
Part 2: Pattern Recognition Engine
This is the smartest part of the code. It automatically scans for popular technical analysis candlestick patterns. If a candle meets the rules, it awards Bonus Points to that direction's strength.
Bullish (Uptrend) Patterns and Criteria:
Hammer: Long lower wick, short upper wick (Buyers bought the dip). +25 points.
Bullish Engulfing: The green candle's body is larger than the previous red candle's body. +30 points.
Bullish Marubozu: A solid green candle with almost no wicks. +35 points.
Morning Star, Tweezer Bottom, Harami: Other classic reversal patterns.
Bearish (Downtrend) Patterns and Criteria:
Shooting Star: Long upper wick, short lower wick (Sellers hit from the top). +25 points.
Bearish Engulfing: The red body engulfs the previous green body. +30 points.
Bearish Marubozu: A solid, full red candle. +35 points.
Evening Star, Tweezer Top, Hanging Man: Classic bearish reversal patterns.
Part 3: Volume Confirmation
Low-volume rallies are usually traps. To solve this, the code divides the current candle's volume by the volume average of the last 20 candles (SMA). If the volume is above the average, the power is multiplied; if it is below, it reduces the score.
Part 4: Final Strength Calculation
The code aggregates all this data (Position in the candle + Volume + Bonus Points) and creates two pools: Raw Bullish Power and Raw Bearish Power. It then converts them into percentages:
Bullish Percentage = (Bullish Score / Total Score) * 100
For example, at the end of the calculation, the system tells you: "There is 80% Buying and 20% Selling pressure on this candle."
Part 5: Visualization, Tables, and Alerts
It displays the results on your screen for easy reading:
Sub-chart Lines: Draws dynamic Green and Red lines to show instantly who is in control.
Top-Right Table: Shows the real-time percentage status of the candle and the detected pattern name (e.g., Hammer).
Background Colors and Alerts: If either side exceeds a threshold you set in the settings (for example 75%), it paints the background of the screen and sends an automatic alert to your phone or computer.
GOOD LUCK!
Author:Rmzn4406
What Does This Code Do For You?
Saves you from the hassle of constantly scanning for candlestick patterns on the screen.
Measures whether price action is supported by volume.
Provides an emotion-free, mathematical momentum report.
Part 1: Measuring the Candle Anatomy
The code breaks down every new candlestick into precise components:
Candle Range: The difference between the highest and lowest price.
Body Size: The net difference between the open and close price.
Wicks (Upper and Lower): Shows how much the price was rejected at the top and bottom.
Part 2: Pattern Recognition Engine
This is the smartest part of the code. It automatically scans for popular technical analysis candlestick patterns. If a candle meets the rules, it awards Bonus Points to that direction's strength.
Bullish (Uptrend) Patterns and Criteria:
Hammer: Long lower wick, short upper wick (Buyers bought the dip). +25 points.
Bullish Engulfing: The green candle's body is larger than the previous red candle's body. +30 points.
Bullish Marubozu: A solid green candle with almost no wicks. +35 points.
Morning Star, Tweezer Bottom, Harami: Other classic reversal patterns.
Bearish (Downtrend) Patterns and Criteria:
Shooting Star: Long upper wick, short lower wick (Sellers hit from the top). +25 points.
Bearish Engulfing: The red body engulfs the previous green body. +30 points.
Bearish Marubozu: A solid, full red candle. +35 points.
Evening Star, Tweezer Top, Hanging Man: Classic bearish reversal patterns.
Part 3: Volume Confirmation
Low-volume rallies are usually traps. To solve this, the code divides the current candle's volume by the volume average of the last 20 candles (SMA). If the volume is above the average, the power is multiplied; if it is below, it reduces the score.
Part 4: Final Strength Calculation
The code aggregates all this data (Position in the candle + Volume + Bonus Points) and creates two pools: Raw Bullish Power and Raw Bearish Power. It then converts them into percentages:
Bullish Percentage = (Bullish Score / Total Score) * 100
For example, at the end of the calculation, the system tells you: "There is 80% Buying and 20% Selling pressure on this candle."
Part 5: Visualization, Tables, and Alerts
It displays the results on your screen for easy reading:
Sub-chart Lines: Draws dynamic Green and Red lines to show instantly who is in control.
Top-Right Table: Shows the real-time percentage status of the candle and the detected pattern name (e.g., Hammer).
Background Colors and Alerts: If either side exceeds a threshold you set in the settings (for example 75%), it paints the background of the screen and sends an automatic alert to your phone or computer.
GOOD LUCK!
Author:Rmzn4406
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。