OPEN-SOURCE SCRIPT
Cycle Spectrogram [LuxAlgo]

The Cycle Spectrogram indicator is a spectral analysis tool that visualizes the power of various price cycles to identify dominant periodicities and market rhythms.
🔶 USAGE
The indicator provides a technical visualization of spectral density over time by decomposing price action into multiple cycle bands. This allows traders to identify whether the market is currently influenced by short-term noise or long-term structural cycles.
🔹 Spectrogram Interpretation
The spectrogram consists of 30 rows, each representing a specific cycle period. The vertical axis is logarithmically scaled between the "Minimum Period" and "Maximum Period" settings.
🔹 Dominant Period Tracking
To help identify the most significant cycle at any given time, the script includes a Dominant Period Marker (red cross). This marker tracks the row with the highest energy, providing a real-time estimate of the current market cycle length in bars.
🔹 Dashboard Metrics
A real-time dashboard provides key analytical data:
🔶 DETAILS
A spectrogram is a visual representation of the spectrum of a signal as it varies with time. This script utilizes a series of Bandpass filters to isolate specific cycle lengths. Each filter is tuned to a period calculated using a logarithmic distribution, ensuring that the analysis covers a wide range of market periodicities without bias toward specific scales.
The "Power" of each cycle is calculated by squaring the output of the bandpass filter and applying a smoothing factor. This process helps filter out transient spikes and provides a cleaner "heat" signature for more reliable cycle identification.
🔶 SETTINGS
🔹 Aesthetics
🔹 Settings
🔹 Dashboard
🔶 USAGE
The indicator provides a technical visualization of spectral density over time by decomposing price action into multiple cycle bands. This allows traders to identify whether the market is currently influenced by short-term noise or long-term structural cycles.
🔹 Spectrogram Interpretation
The spectrogram consists of 30 rows, each representing a specific cycle period. The vertical axis is logarithmically scaled between the "Minimum Period" and "Maximum Period" settings.
- Color Intensity: Brighter or more saturated colors (depending on the selected theme) indicate higher spectral power or "energy" at that specific cycle length.
- Vertical Position: Higher rows represent longer cycle periods (slower cycles), while lower rows represent shorter periods (faster cycles).
🔹 Dominant Period Tracking
To help identify the most significant cycle at any given time, the script includes a Dominant Period Marker (red cross). This marker tracks the row with the highest energy, providing a real-time estimate of the current market cycle length in bars.
🔹 Dashboard Metrics
A real-time dashboard provides key analytical data:
- Current DP: The period (in bars) of the most powerful cycle found in the current bar.
- Average DP: A 20-period moving average of the dominant period, useful for identifying stable, persistent cycles versus erratic shifts.
- Lowest Period: A reference for the minimum boundary of the spectral analysis.
🔶 DETAILS
A spectrogram is a visual representation of the spectrum of a signal as it varies with time. This script utilizes a series of Bandpass filters to isolate specific cycle lengths. Each filter is tuned to a period calculated using a logarithmic distribution, ensuring that the analysis covers a wide range of market periodicities without bias toward specific scales.
The "Power" of each cycle is calculated by squaring the output of the bandpass filter and applying a smoothing factor. This process helps filter out transient spikes and provides a cleaner "heat" signature for more reliable cycle identification.
🔶 SETTINGS
🔹 Aesthetics
- Theme: Select from several high-contrast color maps, including Viridis, Inferno, Magma, Plasma, Cividis, and Turbo.
🔹 Settings
- Minimum Period: The shortest cycle length (in bars) to include in the analysis.
- Maximum Period: The longest cycle length (in bars) to include in the analysis.
- Bandwidth: Controls the "focus" or resonance of each cycle band. Lower values result in narrower, more precise detection, while higher values allow for more overlap.
- Power Smoothing: Determines the amount of smoothing applied to the amplitude. Higher values reduce visual noise but may increase lag in detecting cycle shifts.
🔹 Dashboard
- Dashboard: Toggles the visibility of the data table.
- Position: Moves the dashboard to different corners of the pane.
- Size: Adjusts the text and cell size of the dashboard.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。