OPEN-SOURCE SCRIPT
CAP - CSI [Auto-MTF]

The CAP - CSI is a Digital Signal Processing (DSP) tool based on the principles of Lars von Thienen’s "Dynamic Cycles." While traditional oscillators often fail in trending markets by staying "pinned" at extremes, the CSI uses a recursive dual-thrust processor to isolate the underlying market rhythm, helping traders identify when a cycle is genuinely exhausted.
Core Methodology
This script implements a Cycle Swing Momentum processor. It calculates the difference between short-term and long-term "thrusts" to extract the dominant cycle from price action. Unlike static indicators, it uses Dynamic Percentile Banding to adapt its overbought and oversold levels based on the market's recent "cyclic memory."
Key Features
Pivot Point Detection: Identifies exhaustion when the CSI extends outside its dynamic bands and begins to pivot back toward the mean.
Trend-Aware Coloring: The area fill uses slope-based logic to differentiate between "Rising/Falling" momentum and "Bullish/Bearish" strong zones.
HTF (5x): Built-in logic to define the larger cycle trend. I recommend using a 5x multiplier (e.g., viewing 4H cycles on a 1H chart) to ensure you are trading with the macro flow.
Zero Line Equilibrium: Clear visualization of the cycle's position relative to its center-point to determine the current market regime.
The "Trending" Challenge
A common pitfall with DSP-based cycle tools is that they can generate "phantom" signals during powerful, linear trending conditions. This script is my attempt to solve that by integrating HTF confluence and slope-based filtering. It is specifically optimized for:
Futures: ES, NQ, RTY, and GC.
US Equities: (NVDA, TSLA, etc.).
Additional tip, search for Strong relative strength Symbols, I've created this script : CAP - Mansfield Relative Strength, but there are many there "Mansfield Relative Strength" indicators available.
Why I am sharing this
This is an ongoing project. I am releasing this to the public to connect with other traders interested in Lars von Thienen’s work or John Ehlers’ DSP techniques. My goal is to collaborate with the community to refine the processor further and build a consistent, profitable system that can distinguish between a cycle turn and a trend continuation.
Core Methodology
This script implements a Cycle Swing Momentum processor. It calculates the difference between short-term and long-term "thrusts" to extract the dominant cycle from price action. Unlike static indicators, it uses Dynamic Percentile Banding to adapt its overbought and oversold levels based on the market's recent "cyclic memory."
Key Features
Pivot Point Detection: Identifies exhaustion when the CSI extends outside its dynamic bands and begins to pivot back toward the mean.
Trend-Aware Coloring: The area fill uses slope-based logic to differentiate between "Rising/Falling" momentum and "Bullish/Bearish" strong zones.
HTF (5x): Built-in logic to define the larger cycle trend. I recommend using a 5x multiplier (e.g., viewing 4H cycles on a 1H chart) to ensure you are trading with the macro flow.
Zero Line Equilibrium: Clear visualization of the cycle's position relative to its center-point to determine the current market regime.
The "Trending" Challenge
A common pitfall with DSP-based cycle tools is that they can generate "phantom" signals during powerful, linear trending conditions. This script is my attempt to solve that by integrating HTF confluence and slope-based filtering. It is specifically optimized for:
Futures: ES, NQ, RTY, and GC.
US Equities: (NVDA, TSLA, etc.).
Additional tip, search for Strong relative strength Symbols, I've created this script : CAP - Mansfield Relative Strength, but there are many there "Mansfield Relative Strength" indicators available.
Why I am sharing this
This is an ongoing project. I am releasing this to the public to connect with other traders interested in Lars von Thienen’s work or John Ehlers’ DSP techniques. My goal is to collaborate with the community to refine the processor further and build a consistent, profitable system that can distinguish between a cycle turn and a trend continuation.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.