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の精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。