OPEN-SOURCE SCRIPT
已更新 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.
版本注释
Added user on/off toggle for triangle labels.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。