Contraction Box & Doji Lines

Contraction & Doji Lines indicator is designed to identify and visualize potential support and resistance levels on a price chart. It does this by detecting doji candlestick patterns and drawing horizontal lines from the middle of the doji bodies to the right. Additionally, it also highlights price contraction zones with colored boxes.

The indicator first identifies doji candlestick patterns that it suggests indecision in the market, a horizontal line and these horizontal lines can act as potential support or resistance levels. Traders can observe price reactions around these lines. If the price approaches a line and bounces off it, it may indicate a significant level in the market.

In addition to doji lines, this indicator also highlights price contraction zones. When a contraction zone is detected, a colored box is drawn to highlight this zone. The box extends from the fifth bar ago (left side) to the current bar (right side), with the highest high and lowest low of the identified zone. The color and width of this box can be customized using the "Box Line Border Color," "Box Background Color," and "Box Width" parameters.

A possible strategy could be can use the doji lines as potential support and resistance levels to make trading decisions. For example, if the price breaks above a doji line and holds, it may indicate a bullish signal.

The colored boxes highlight areas of price contraction, which often precede significant price movements. Traders can use these zones to anticipate potential breakouts or breakdowns.
For example, you might enter a long (buy) position if it anticipate a breakout from a contraction zone with a target price set above the breakout level. Conversely, you might enter a short (sell) position if they anticipate a breakdown from a contraction zone with a target price set below the breakdown level.


本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。