PROTECTED SOURCE SCRIPT

Important Fractals

46
This script automatically detects Bill Williams–style fractals (pivot highs and pivot lows) and draws horizontal support and resistance levels based on confirmed structures in price action.

Each detected fractal creates a level that is actively monitored until a confirmed breakout occurs.

Core logic:

• Fractals are identified using ta.pivothigh and ta.pivotlow, with adjustable left and right bar settings.
• A horizontal level is drawn once the fractal is confirmed and is extended forward in time.
• A level is considered broken only after two consecutive candle closes on the wrong side of the level (not based on wick penetration).
• Option to either keep historical levels after breakout (stop extending them) or remove them completely.
• Adjustable maximum number of visible fractals to maintain chart clarity.
• Optional price labels displaying the exact level value.

Configurable parameters:

– Left / Right Bars – number of candles required to confirm a fractal
– Line Width / Line Style – visual customization of levels
– Keep Lines After Break – retain historical levels after breakout
– Maximum Visible Fractals – limit of active levels on the chart
– Show Fractal Value Labels – display price values next to levels

Use cases:

The script can be used to identify local market structure, observe support/resistance reactions, monitor breakout confirmations, and incorporate structural levels into breakout or retest-based trading systems.

Note that fractals are confirmed only after the required number of right-side candles, meaning they are structural (lagging) signals rather than predictive ones.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.