PROTECTED SOURCE SCRIPT
SPX Breadth MA 200 Trend Following Strategy [TradeSoEasy]

運用「S&P 500 成分股中價格高於200日移動平均線的百分比」作為核心指標,精準捕捉市場主要趨勢。
策略核心邏輯:
📈 進場條件 (多頭): 當S&P 500成分股中,價格高於200日均線的股票百分比超過 [Buy 買入閾值]%時,判斷市場處於強勢,執行買入操作。
📉 出場條件 (平倉): 當該百分比跌破 [Exit 出場閾值]%時,判斷市場趨勢可能轉弱,執行平倉操作。
重要提示:數據來源與計算
本策略透過request.security()函數引用外部市場廣度數據S5TH,請確保您了解該數據的來源與特性。
⚠️ 重要免責聲明與風險提示:
回測結果不代表未來表現: 歷史績效數據僅供參考,不保證未來也能取得相同或類似的回報。
-------------------------------------
Strategy Core Logic: S&P 500 Breadth & Trend Following
This strategy utilizes the "Percentage of S&P 500 Components Above their 200-Day Moving Average" as its core indicator to accurately capture the market's primary trend.
📈 Entry Condition (Long): When the percentage of S&P 500 components whose price is above their 200-day MA exceeds [Buy Threshold]%, the strategy identifies a strong market and executes a buy (long) operation.
📉 Exit Condition (Close Position): When this percentage falls below [Exit Threshold]%, the strategy identifies a potential weakening or reversal in the market trend and executes a close position.
Important Note: Data Source & Calculation
This strategy uses the request.security() function to reference external market breadth data, specifically the S5TH symbol. Please ensure you understand the source and characteristics of this data, as it is not calculated internally by the Pine Script from individual S&P 500 components.
⚠️ Important Disclaimer & Risk Warning:
Past performance is not indicative of future results: Historical performance data is for informational purposes only and does not guarantee similar returns in the future.
Real-world trading costs: Please note that actual trading involves commissions, slippage, and liquidity factors that may differ from backtest results, impacting your final returns.
策略核心邏輯:
📈 進場條件 (多頭): 當S&P 500成分股中,價格高於200日均線的股票百分比超過 [Buy 買入閾值]%時,判斷市場處於強勢,執行買入操作。
📉 出場條件 (平倉): 當該百分比跌破 [Exit 出場閾值]%時,判斷市場趨勢可能轉弱,執行平倉操作。
重要提示:數據來源與計算
本策略透過request.security()函數引用外部市場廣度數據S5TH,請確保您了解該數據的來源與特性。
⚠️ 重要免責聲明與風險提示:
回測結果不代表未來表現: 歷史績效數據僅供參考,不保證未來也能取得相同或類似的回報。
-------------------------------------
Strategy Core Logic: S&P 500 Breadth & Trend Following
This strategy utilizes the "Percentage of S&P 500 Components Above their 200-Day Moving Average" as its core indicator to accurately capture the market's primary trend.
📈 Entry Condition (Long): When the percentage of S&P 500 components whose price is above their 200-day MA exceeds [Buy Threshold]%, the strategy identifies a strong market and executes a buy (long) operation.
📉 Exit Condition (Close Position): When this percentage falls below [Exit Threshold]%, the strategy identifies a potential weakening or reversal in the market trend and executes a close position.
Important Note: Data Source & Calculation
This strategy uses the request.security() function to reference external market breadth data, specifically the S5TH symbol. Please ensure you understand the source and characteristics of this data, as it is not calculated internally by the Pine Script from individual S&P 500 components.
⚠️ Important Disclaimer & Risk Warning:
Past performance is not indicative of future results: Historical performance data is for informational purposes only and does not guarantee similar returns in the future.
Real-world trading costs: Please note that actual trading involves commissions, slippage, and liquidity factors that may differ from backtest results, impacting your final returns.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.