OPEN-SOURCE SCRIPT

Candle Percentage

570
This script calculates the percentage movement of the candle body from open to close and displays it as a label on the chart. The label color changes based on the candle's direction:

Green for bullish (price closes higher than it opened),

Red for bearish (price closes lower than it opened).

The script also allows you to select the label size, with the following options:

Tiny (very small text)

Small (small text)

Normal (default text size)

Large (large text)

Huge (giant text)

By default, the label size is set to Normal.

The percentage is calculated using the formula:

(Body Size / Open Price) * 100

This is helpful for traders who want to quickly assess the magnitude of price movement within each candle and analyze market sentiment based on the size of the body.

Disclaimer

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.