OPEN-SOURCE SCRIPT
已更新 Candle Color Flip

Candle Color Flip highlights potential short-term reversals caused by back-to-back candles closing in opposite colors.
The script:
Watches for a green candle that closes after a red candle without making a lower low, and for a red candle that closes after a green candle without making a higher high.
Plots compact markers on qualifying bars (green triangles below for red→green flips, red triangles above for green→red flips).
Offers alert conditions for both directions, so you can set notifications that fire only when a confirmed bar meets the flip rules.
Can also be used to determine exit points on trades by confirming reversals.
Use it to quickly spot where buyers or sellers may be stepping in while the prior candle’s extremes still hold. You can enable “Any alert() function call” for real-time notifications, or stick with bar-close alerts for confirmation.
The script:
Watches for a green candle that closes after a red candle without making a lower low, and for a red candle that closes after a green candle without making a higher high.
Plots compact markers on qualifying bars (green triangles below for red→green flips, red triangles above for green→red flips).
Offers alert conditions for both directions, so you can set notifications that fire only when a confirmed bar meets the flip rules.
Can also be used to determine exit points on trades by confirming reversals.
Use it to quickly spot where buyers or sellers may be stepping in while the prior candle’s extremes still hold. You can enable “Any alert() function call” for real-time notifications, or stick with bar-close alerts for confirmation.
版本注释
Updated logic for alert conditions.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。