OPEN-SOURCE SCRIPT
Magic 13 for China Stock Market

Price Exhaustion Counter - 9/13 Signals
This indicator tracks consecutive closes relative to their 4-bar precedent, identifying potential trend exhaustion points.
KEY FEATURES:
- Counts consecutive higher/lower closes up to 9
- Extends counting to 13 for confirmation signals
- Customizable early warning display (counts 5-8)
- Background highlighting for approaching signals
- Clean, non-overlapping label placement
SIGNAL GUIDE:
- Counts 5-8 (orange): Early momentum warning
- Count 9 (purple/green badge): Primary exhaustion signal
- Counts 10-13 (green/purple): Extended momentum - stronger reversal potential
CUSTOMIZATION:
- Toggle early signals visibility
- Adjust label offset for clarity
- Enable/disable background hints
- All timeframes supported
Identifies high-probability reversal zones based on consecutive price action.
This indicator tracks consecutive closes relative to their 4-bar precedent, identifying potential trend exhaustion points.
KEY FEATURES:
- Counts consecutive higher/lower closes up to 9
- Extends counting to 13 for confirmation signals
- Customizable early warning display (counts 5-8)
- Background highlighting for approaching signals
- Clean, non-overlapping label placement
SIGNAL GUIDE:
- Counts 5-8 (orange): Early momentum warning
- Count 9 (purple/green badge): Primary exhaustion signal
- Counts 10-13 (green/purple): Extended momentum - stronger reversal potential
CUSTOMIZATION:
- Toggle early signals visibility
- Adjust label offset for clarity
- Enable/disable background hints
- All timeframes supported
Identifies high-probability reversal zones based on consecutive price action.
Open-source script
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.
Disclaimer
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.
Open-source script
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.
Disclaimer
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.