OPEN-SOURCE SCRIPT
Telah dikemas kini Custom Fractals

This indicator detects custom bullish and bearish fractal formations by identifying confirmed swing highs and swing lows based on user-defined candle structure. A bearish fractal forms when a candle’s high is greater than the surrounding candles, while a bullish fractal forms when a candle’s low is lower than the surrounding candles. Optional RSI confirmation can be applied to filter signals so that bearish fractals only appear in overbought conditions and bullish fractals only appear in oversold conditions. The script can also draw horizontal pivot levels from each confirmed fractal to help visualize potential support and resistance zones.
“Bars Before” controls how many candles to the left of the pivot must confirm the fractal structure, while “Bars After” determines how many candles to the right are required before the signal becomes confirmed. Larger settings create stronger but less frequent fractals, while smaller settings react faster and generate more signals. “Non-Repaint Signals” waits for candle close confirmation before plotting signals to reduce repaint behavior during live market conditions. “Draw Horizontal Pivot Lines” displays support and resistance lines extending from confirmed fractals.
“Limit to Recent Signals Only” restricts how many historical fractals remain visible on the chart, while “Recent Signal Count” defines the maximum number of stored signals and pivot lines. “Use RSI Confirmation” enables momentum filtering using the Relative Strength Index. “RSI Length” controls the RSI calculation period, “RSI Source” selects the price source used for RSI calculations, and the “RSI Overbought” and “RSI Oversold” levels determine where RSI confirmation is required for bearish and bullish fractals.
The pivot line settings allow full customization of the horizontal structure levels. “Pivot Line Length” controls how far the level extends into future candles, while the color, width, and style settings customize the appearance of bullish and bearish pivot zones.
This tool is designed for traders who want to identify potential reversal zones, short-term exhaustion points, and key support or resistance levels using price structure and optional momentum confirmation.
“Bars Before” controls how many candles to the left of the pivot must confirm the fractal structure, while “Bars After” determines how many candles to the right are required before the signal becomes confirmed. Larger settings create stronger but less frequent fractals, while smaller settings react faster and generate more signals. “Non-Repaint Signals” waits for candle close confirmation before plotting signals to reduce repaint behavior during live market conditions. “Draw Horizontal Pivot Lines” displays support and resistance lines extending from confirmed fractals.
“Limit to Recent Signals Only” restricts how many historical fractals remain visible on the chart, while “Recent Signal Count” defines the maximum number of stored signals and pivot lines. “Use RSI Confirmation” enables momentum filtering using the Relative Strength Index. “RSI Length” controls the RSI calculation period, “RSI Source” selects the price source used for RSI calculations, and the “RSI Overbought” and “RSI Oversold” levels determine where RSI confirmation is required for bearish and bullish fractals.
The pivot line settings allow full customization of the horizontal structure levels. “Pivot Line Length” controls how far the level extends into future candles, while the color, width, and style settings customize the appearance of bullish and bearish pivot zones.
This tool is designed for traders who want to identify potential reversal zones, short-term exhaustion points, and key support or resistance levels using price structure and optional momentum confirmation.
Nota Keluaran
Added user on/off toggle for triangle labels.Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.