PROTECTED SOURCE SCRIPT
Candle Body/Wick Percentages

Here's a breakdown of what it does:
Enables/Disables Coloring: It first checks the enable_body_coloring input. If this is set to false, no custom coloring will be applied, and candles will retain their default TradingView colors.
Determines Candle Direction: It identifies if the current candle is is_bull_candle (close > open) or is_bear_candle (close < open).
Applies Colors Based on Thresholds and Direction:
Strong Movement: If the body_pct is greater than or equal to the high_body_pct_threshold (meaning a large body relative to the total range), it then checks the candle's direction:
If it's a bullish candle, it applies the strong_bull_color.
If it's a bearish candle, it applies the strong_bear_color.
Indecisive Movement: If the body_pct is less than or equal to the low_body_pct_threshold (meaning a small body and relatively large wicks, indicating indecision), it again checks the candle's direction:
If it's a bullish candle, it applies the indecisive_bull_color.
If it's a bearish candle, it applies the indecisive_bear_color.
If the candle is a pure doji (open equals close), it colors it gray.
Default Color: For any candles that don't meet the "high" or "low" body percentage thresholds, the candle_color is set to na, which tells TradingView to use its default candle coloring (usually green for bullish, red for bearish).
Applies Color to Chart: Finally, the barcolor(candle_color) function applies the determined candle_color to the actual candle on the chart for the current bar.
In essence, this script visually highlights candles that show either very strong directional conviction (large body) or significant indecision (small body with large wicks) by changing their color, while still differentiating between bullish and bearish movements.
Enables/Disables Coloring: It first checks the enable_body_coloring input. If this is set to false, no custom coloring will be applied, and candles will retain their default TradingView colors.
Determines Candle Direction: It identifies if the current candle is is_bull_candle (close > open) or is_bear_candle (close < open).
Applies Colors Based on Thresholds and Direction:
Strong Movement: If the body_pct is greater than or equal to the high_body_pct_threshold (meaning a large body relative to the total range), it then checks the candle's direction:
If it's a bullish candle, it applies the strong_bull_color.
If it's a bearish candle, it applies the strong_bear_color.
Indecisive Movement: If the body_pct is less than or equal to the low_body_pct_threshold (meaning a small body and relatively large wicks, indicating indecision), it again checks the candle's direction:
If it's a bullish candle, it applies the indecisive_bull_color.
If it's a bearish candle, it applies the indecisive_bear_color.
If the candle is a pure doji (open equals close), it colors it gray.
Default Color: For any candles that don't meet the "high" or "low" body percentage thresholds, the candle_color is set to na, which tells TradingView to use its default candle coloring (usually green for bullish, red for bearish).
Applies Color to Chart: Finally, the barcolor(candle_color) function applies the determined candle_color to the actual candle on the chart for the current bar.
In essence, this script visually highlights candles that show either very strong directional conviction (large body) or significant indecision (small body with large wicks) by changing their color, while still differentiating between bullish and bearish movements.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.