OPEN-SOURCE SCRIPT
Candle Anatomy (feat. Dr. Rupward)

# Candle Anatomy (feat. Dr. Rupward)
## Overview
This indicator dissects a single Higher Timeframe (HTF) candle and displays it separately on the right side of your chart with detailed anatomical analysis. Instead of cluttering your entire chart with analysis on every candle, this tool focuses on what matters most: understanding the structure and strength of the most recent HTF candle.
---
## Why I Built This
When analyzing price action, I often found myself manually calculating wick-to-body ratios, estimating retracement levels, and trying to gauge candle strength. This indicator automates that process and presents it in a clean, visual format.
The "Dr. Rupward" theme is just for fun – a lighthearted way to present technical analysis. Think of it as your chart's "health checkup." Don't take it too seriously, but do take the data seriously!
---
## How It Works
### 1. Candle Decomposition
The indicator breaks down the HTF candle into three components:
- **Upper Wick %** = (High - max(Open, Close)) / Range × 100
- **Body %** = |Close - Open| / Range × 100
- **Lower Wick %** = (min(Open, Close) - Low) / Range × 100
Where Range = High - Low
### 2. Strength Assessment
Based on body percentage:
- **Strong** (≥70%): High conviction move, trend likely to continue
- **Moderate** (40-69%): Normal price action
- **Weak** (<40%): Indecision, potential reversal or consolidation
### 3. Pressure Analysis
- **Upper Wick** indicates selling pressure (bulls pushed up, but sellers rejected)
- **Lower Wick** indicates buying pressure (bears pushed down, but buyers rejected)
Thresholds:
- ≥30%: Strong pressure
- 15-29%: Moderate pressure
- <15%: Weak pressure
### 4. Pattern Recognition
The indicator automatically detects:
| Pattern | Condition |
|---------|-----------|
| Doji | Body < 10% |
| Hammer | Lower wick ≥ 60%, Upper wick < 10%, Body < 35% |
| Shooting Star | Upper wick ≥ 60%, Lower wick < 10%, Body < 35% |
| Marubozu | Body ≥ 90% |
| Spinning Top | Body < 30%, Both wicks > 25% |
### 5. Fibonacci Levels
Displays key Fibonacci retracement and extension levels based on the candle's range:
**Retracement:** 0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0
**Extension:** 1.272, 1.618, 2.0, 2.618
**Negative Extension:** -0.272, -0.618, -1.0
These levels help identify potential support/resistance if price retraces into or extends beyond the analyzed candle.
### 6. Comparison with Previous Candle
When enabled, displays the previous HTF candle (semi-transparent) alongside the current one. This allows you to:
- Compare range expansion/contraction
- Observe momentum shifts
- Identify continuation or reversal setups
---
## Settings Explained
### Display Settings
- **Analysis Timeframe**: The HTF candle to analyze (default: Daily)
- **Offset from Chart**: Distance from the last bar (default: 15)
- **Candle Width**: Visual width of the anatomy candle
- **Show Previous Candle**: Toggle comparison view
### Fibonacci Levels
- Toggle individual levels on/off based on your preference
- Retracement levels for pullback analysis
- Extension levels for target projection
### Diagnosis Panel
- Shows pattern name, strength assessment, and expected behavior
- Can be toggled off if you prefer minimal display
---
## Use Cases
1. **Swing Trading**: Analyze daily candle structure before entering on lower timeframes
2. **Trend Confirmation**: Strong body % with minimal upper wick = healthy trend
3. **Reversal Detection**: Hammer/Shooting Star patterns with high wick %
4. **Target Setting**: Use Fibonacci extensions for take-profit levels
---
## Notes
- This indicator is designed for analysis, not for generating buy/sell signals
- Works best on liquid markets with clean price action
- The "diagnosis" is algorithmic interpretation, not financial advice
- Combine with your own analysis and risk management
---
## About the Name
"Dr. Rupward" is a playful persona I created – combining "Right" + "Upward" (my trading philosophy) with a doctor theme because we're "diagnosing" candle health. It's meant to make technical analysis a bit more fun and approachable. Enjoy!
---
## Feedback Welcome
If you find this useful or have suggestions for improvement, feel free to leave a comment. Happy trading!
## Overview
This indicator dissects a single Higher Timeframe (HTF) candle and displays it separately on the right side of your chart with detailed anatomical analysis. Instead of cluttering your entire chart with analysis on every candle, this tool focuses on what matters most: understanding the structure and strength of the most recent HTF candle.
---
## Why I Built This
When analyzing price action, I often found myself manually calculating wick-to-body ratios, estimating retracement levels, and trying to gauge candle strength. This indicator automates that process and presents it in a clean, visual format.
The "Dr. Rupward" theme is just for fun – a lighthearted way to present technical analysis. Think of it as your chart's "health checkup." Don't take it too seriously, but do take the data seriously!
---
## How It Works
### 1. Candle Decomposition
The indicator breaks down the HTF candle into three components:
- **Upper Wick %** = (High - max(Open, Close)) / Range × 100
- **Body %** = |Close - Open| / Range × 100
- **Lower Wick %** = (min(Open, Close) - Low) / Range × 100
Where Range = High - Low
### 2. Strength Assessment
Based on body percentage:
- **Strong** (≥70%): High conviction move, trend likely to continue
- **Moderate** (40-69%): Normal price action
- **Weak** (<40%): Indecision, potential reversal or consolidation
### 3. Pressure Analysis
- **Upper Wick** indicates selling pressure (bulls pushed up, but sellers rejected)
- **Lower Wick** indicates buying pressure (bears pushed down, but buyers rejected)
Thresholds:
- ≥30%: Strong pressure
- 15-29%: Moderate pressure
- <15%: Weak pressure
### 4. Pattern Recognition
The indicator automatically detects:
| Pattern | Condition |
|---------|-----------|
| Doji | Body < 10% |
| Hammer | Lower wick ≥ 60%, Upper wick < 10%, Body < 35% |
| Shooting Star | Upper wick ≥ 60%, Lower wick < 10%, Body < 35% |
| Marubozu | Body ≥ 90% |
| Spinning Top | Body < 30%, Both wicks > 25% |
### 5. Fibonacci Levels
Displays key Fibonacci retracement and extension levels based on the candle's range:
**Retracement:** 0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0
**Extension:** 1.272, 1.618, 2.0, 2.618
**Negative Extension:** -0.272, -0.618, -1.0
These levels help identify potential support/resistance if price retraces into or extends beyond the analyzed candle.
### 6. Comparison with Previous Candle
When enabled, displays the previous HTF candle (semi-transparent) alongside the current one. This allows you to:
- Compare range expansion/contraction
- Observe momentum shifts
- Identify continuation or reversal setups
---
## Settings Explained
### Display Settings
- **Analysis Timeframe**: The HTF candle to analyze (default: Daily)
- **Offset from Chart**: Distance from the last bar (default: 15)
- **Candle Width**: Visual width of the anatomy candle
- **Show Previous Candle**: Toggle comparison view
### Fibonacci Levels
- Toggle individual levels on/off based on your preference
- Retracement levels for pullback analysis
- Extension levels for target projection
### Diagnosis Panel
- Shows pattern name, strength assessment, and expected behavior
- Can be toggled off if you prefer minimal display
---
## Use Cases
1. **Swing Trading**: Analyze daily candle structure before entering on lower timeframes
2. **Trend Confirmation**: Strong body % with minimal upper wick = healthy trend
3. **Reversal Detection**: Hammer/Shooting Star patterns with high wick %
4. **Target Setting**: Use Fibonacci extensions for take-profit levels
---
## Notes
- This indicator is designed for analysis, not for generating buy/sell signals
- Works best on liquid markets with clean price action
- The "diagnosis" is algorithmic interpretation, not financial advice
- Combine with your own analysis and risk management
---
## About the Name
"Dr. Rupward" is a playful persona I created – combining "Right" + "Upward" (my trading philosophy) with a doctor theme because we're "diagnosing" candle health. It's meant to make technical analysis a bit more fun and approachable. Enjoy!
---
## Feedback Welcome
If you find this useful or have suggestions for improvement, feel free to leave a comment. Happy trading!
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。