OPEN-SOURCE SCRIPT
bar color change

This Pine v5 code allows you to distinguish between candles on the chart. The body/wick/frame of the "live" candle that hasn't yet closed is colored white. When a live candle is present, the body of the immediately preceding candle is colored green with offset = -1. All other candles remain gray (#2e2e2e). plotcandle fixes the wick/frame so that the live and previous candles are selected when following the trend. If there are other conflicting scripts, the most recently added one quickly takes precedence.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.