OPEN-SOURCE SCRIPT
Wick to Body Ratio Table

Hello, I'm Gomaa if don't know me and if you want to know more about me follow me on my social media accounts which my propose to teach people "How To Learn".
Use this link so you can find me: linktr.ee/GomaA5
Overview
The "Wick to Body Ratio Table" is a comprehensive analytical tool designed to provide traders with detailed insights into candle structure and price movement dynamics. This indicator breaks down each candle into its component parts and displays real-time statistics in an easy-to-read table format.
What It Does
This indicator analyzes the current candle and displays four key metrics for each component:
Ratio to Body - How large each wick is compared to the candle body
Percentage of Total - What portion of the entire candle each component represents
Move Percentage - The actual price movement as a percentage from the opening price
Component breakdown - Upper wick, body, lower wick, and totals
Key Features
Real-Time Analysis:
Updates automatically with every price tick on the current candle
Works seamlessly across ALL timeframes (1 second to monthly charts)
No lag or delay in calculations
Comprehensive Metrics:
Upper Wick: Shows rejection from higher prices and selling pressure
Closed Body: Displays the actual price change from open to close (bullish=green, bearish=red)
Lower Wick: Indicates rejection from lower prices and buying pressure
Total Wick: Combined wick analysis for overall volatility assessment
Whole Candle: Complete range from high to low with total movement percentage
Visual Design:
Color-coded rows for easy identification
Clear headers for each metric column
Positioned at top-right of chart (non-intrusive)
Professional table format with borders and proper spacing
How to Interpret the Data
Ratio to Body Column:
A ratio of 2.0x means that component is twice the size of the body
N/A appears for doji candles (when body = 0)
Higher ratios indicate stronger rejection or indecision
% of Total Column:
Shows what percentage each part contributes to the whole candle
All percentages always add up to 100%
Helps identify if price spent more time in wicks or body
Move % Column:
Calculated from the opening price
Shows actual volatility during the candle period
Example: 0.5% body with 3% total candle = high volatility but little net movement
Trading Applications
1. Rejection Analysis:
Long upper wicks at resistance = strong selling pressure
Long lower wicks at support = strong buying pressure
Wick-to-body ratios above 2:1 suggest significant rejection
2. Volatility Assessment:
Compare body move % to whole candle move %
Large difference indicates choppy price action
Small difference indicates trending movement
3. Candle Patterns:
Identify doji, hammer, shooting star patterns quantitatively
Measure strength of pin bars and rejection candles
Compare current candle structure to historical patterns
4. Market Sentiment:
Body % > 70% = strong directional movement
Wick % > 60% = indecision and rejection
Balanced distribution = consolidation
Settings & Customization
Table position can be modified in the code (top_right, top_left, bottom_right, bottom_left)
Colors can be adjusted for different components
Text size can be changed (size.small, size.normal, size.large)
Decimal precision can be modified in the str.tostring() functions
Best Practices
Use on higher timeframes (15m+) for more reliable signals
Combine with support/resistance levels for context
Look for extreme ratios (>3:1) for high-probability setups
Monitor the move % to gauge true volatility vs. net movement
Technical Details
Written in Pine Script v5
Zero division protection built-in
Handles all edge cases (gaps, doji, extreme wicks)
Lightweight and efficient (minimal CPU usage)
Use this link so you can find me: linktr.ee/GomaA5
Overview
The "Wick to Body Ratio Table" is a comprehensive analytical tool designed to provide traders with detailed insights into candle structure and price movement dynamics. This indicator breaks down each candle into its component parts and displays real-time statistics in an easy-to-read table format.
What It Does
This indicator analyzes the current candle and displays four key metrics for each component:
Ratio to Body - How large each wick is compared to the candle body
Percentage of Total - What portion of the entire candle each component represents
Move Percentage - The actual price movement as a percentage from the opening price
Component breakdown - Upper wick, body, lower wick, and totals
Key Features
Real-Time Analysis:
Updates automatically with every price tick on the current candle
Works seamlessly across ALL timeframes (1 second to monthly charts)
No lag or delay in calculations
Comprehensive Metrics:
Upper Wick: Shows rejection from higher prices and selling pressure
Closed Body: Displays the actual price change from open to close (bullish=green, bearish=red)
Lower Wick: Indicates rejection from lower prices and buying pressure
Total Wick: Combined wick analysis for overall volatility assessment
Whole Candle: Complete range from high to low with total movement percentage
Visual Design:
Color-coded rows for easy identification
Clear headers for each metric column
Positioned at top-right of chart (non-intrusive)
Professional table format with borders and proper spacing
How to Interpret the Data
Ratio to Body Column:
A ratio of 2.0x means that component is twice the size of the body
N/A appears for doji candles (when body = 0)
Higher ratios indicate stronger rejection or indecision
% of Total Column:
Shows what percentage each part contributes to the whole candle
All percentages always add up to 100%
Helps identify if price spent more time in wicks or body
Move % Column:
Calculated from the opening price
Shows actual volatility during the candle period
Example: 0.5% body with 3% total candle = high volatility but little net movement
Trading Applications
1. Rejection Analysis:
Long upper wicks at resistance = strong selling pressure
Long lower wicks at support = strong buying pressure
Wick-to-body ratios above 2:1 suggest significant rejection
2. Volatility Assessment:
Compare body move % to whole candle move %
Large difference indicates choppy price action
Small difference indicates trending movement
3. Candle Patterns:
Identify doji, hammer, shooting star patterns quantitatively
Measure strength of pin bars and rejection candles
Compare current candle structure to historical patterns
4. Market Sentiment:
Body % > 70% = strong directional movement
Wick % > 60% = indecision and rejection
Balanced distribution = consolidation
Settings & Customization
Table position can be modified in the code (top_right, top_left, bottom_right, bottom_left)
Colors can be adjusted for different components
Text size can be changed (size.small, size.normal, size.large)
Decimal precision can be modified in the str.tostring() functions
Best Practices
Use on higher timeframes (15m+) for more reliable signals
Combine with support/resistance levels for context
Look for extreme ratios (>3:1) for high-probability setups
Monitor the move % to gauge true volatility vs. net movement
Technical Details
Written in Pine Script v5
Zero division protection built-in
Handles all edge cases (gaps, doji, extreme wicks)
Lightweight and efficient (minimal CPU usage)
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.