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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน