OPEN-SOURCE SCRIPT

[EmreKb] Combined Candles

This script combines multiple candlestick patterns into a single, unified candle when they are of the same type (bullish or bearish). Instead of displaying every individual candle on the chart, it merges consecutive candles based on their direction to simplify the visual analysis of price movements.

What It Does:

  • Combines Candles: If two or more consecutive candles are bullish (close price higher than open price) or bearish (close price lower than open price), the script merges them into a single candle, adjusting the high, low, and close values accordingly.
  • Displays Merged Candles: The merged candles are drawn on the chart. A green bar represents a bullish period, while a red bar represents a bearish period.


How It Works:

  • The script tracks whether each candle is bullish or bearish.
  • If a candle is the same type as the previous one, it updates the combined candle (adjusting the high, low, and close values).
  • When the type changes (from bullish to bearish or vice versa), it finalizes the current combined candle and starts a new one.
  • The merged candles are displayed on the chart at the end of the data series.


Use Case:

This script simplifies price action by grouping similar candles together, making it easier to identify trends and spot periods of sustained buying or selling pressure. It can help traders focus on the overall direction of the market rather than being distracted by small fluctuations between individual candles.
Candlestick analysis

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية