OPEN-SOURCE SCRIPT
A-Share Broad-Based ETF Dual-Core Timing System

1. Strategy Overview
The "A-Share Broad-Based ETF Dual-Core Timing System" is a quantitative trading strategy tailored for the Chinese A-share market (specifically for broad-based ETFs like CSI 300, CSI 500, STAR 50). Recognizing the market's characteristic of "short bulls, long bears, and sharp bottoms," this strategy employs a "Left-Side Latency + Right-Side Full Position" dual-core driver. It aims to safely bottom-fish during the late stages of a bear market and maximize profits during the main ascending waves of a bull market.
2. Core Logic
A. Left-Side Latency (Rebound/Bottom Fishing)
Capital Allocation: Defaults to 50% position.
Philosophy: "Buy when others fear." Seeks opportunities in extreme panic or momentum divergence.
Entry Signals (Triggered by any of the following):
Extreme Panic: RSI Oversold (<30) + Price below Bollinger Lower Band + Bullish Candle Close (Avoid catching falling knives).
Oversold Bias: Price deviates more than 15% from the 60-day MA (Life Line), betting on mean reversion.
MACD Bullish Divergence: Price makes a new low while MACD histogram does not, accompanied by strengthening momentum.
B. Right-Side Full Position (Trend Following)
Capital Allocation: Aggressively scales up to Full Position (~99%) upon signal trigger.
Philosophy: "Follow the trend." Strike heavily once the trend is confirmed.
Entry Signals (All must be met):
Upward Trend: MACD Golden Cross + Price above 20-day MA.
Breakout Confirmation: CCI indicator breaks above 100, confirming a main ascending wave.
Volume Support: Volume MACD Golden Cross, ensuring price increase is backed by volume.
C. Smart Risk Control
Bear Market Exhaustion Exit: In a bearish trend (MA20 < MA60), the strategy does not "hold and hope." It immediately liquidates left-side positions upon signs of rebound exhaustion (breaking below MA20, touching MA60 resistance, or RSI failure).
ATR Trailing Stop: Uses Average True Range (ATR) to calculate a dynamic stop-profit line that rises with the price to lock in profits.
Hard Stop Loss: Forces a stop-loss if the left-side bottom fishing fails and losses exceed a set ATR multiple, preventing deep drawdowns.
3. Recommendations
Target Assets: High liquidity broad-based ETFs such as CSI 300 ETF (510300), CSI 500 ETF (510500), ChiNext ETF (159915), STAR 50 ETF (588000).
Timeframe: Daily Chart.
The "A-Share Broad-Based ETF Dual-Core Timing System" is a quantitative trading strategy tailored for the Chinese A-share market (specifically for broad-based ETFs like CSI 300, CSI 500, STAR 50). Recognizing the market's characteristic of "short bulls, long bears, and sharp bottoms," this strategy employs a "Left-Side Latency + Right-Side Full Position" dual-core driver. It aims to safely bottom-fish during the late stages of a bear market and maximize profits during the main ascending waves of a bull market.
2. Core Logic
A. Left-Side Latency (Rebound/Bottom Fishing)
Capital Allocation: Defaults to 50% position.
Philosophy: "Buy when others fear." Seeks opportunities in extreme panic or momentum divergence.
Entry Signals (Triggered by any of the following):
Extreme Panic: RSI Oversold (<30) + Price below Bollinger Lower Band + Bullish Candle Close (Avoid catching falling knives).
Oversold Bias: Price deviates more than 15% from the 60-day MA (Life Line), betting on mean reversion.
MACD Bullish Divergence: Price makes a new low while MACD histogram does not, accompanied by strengthening momentum.
B. Right-Side Full Position (Trend Following)
Capital Allocation: Aggressively scales up to Full Position (~99%) upon signal trigger.
Philosophy: "Follow the trend." Strike heavily once the trend is confirmed.
Entry Signals (All must be met):
Upward Trend: MACD Golden Cross + Price above 20-day MA.
Breakout Confirmation: CCI indicator breaks above 100, confirming a main ascending wave.
Volume Support: Volume MACD Golden Cross, ensuring price increase is backed by volume.
C. Smart Risk Control
Bear Market Exhaustion Exit: In a bearish trend (MA20 < MA60), the strategy does not "hold and hope." It immediately liquidates left-side positions upon signs of rebound exhaustion (breaking below MA20, touching MA60 resistance, or RSI failure).
ATR Trailing Stop: Uses Average True Range (ATR) to calculate a dynamic stop-profit line that rises with the price to lock in profits.
Hard Stop Loss: Forces a stop-loss if the left-side bottom fishing fails and losses exceed a set ATR multiple, preventing deep drawdowns.
3. Recommendations
Target Assets: High liquidity broad-based ETFs such as CSI 300 ETF (510300), CSI 500 ETF (510500), ChiNext ETF (159915), STAR 50 ETF (588000).
Timeframe: Daily Chart.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.