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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.