OPEN-SOURCE SCRIPT

Parsifal.Swing.Flow

99
The Parsifal.Swing.Flow indicator is a module within the Parsifal Swing Suite, which includes a set of swing indicators such as:
• Parsifal Swing TrendScore
• Parsifal Swing Composite
• Parsifal Swing RSI
• Parsifal Swing Flow
Each module serves as an indicator facilitating judgment of the current swing state in the underlying market.
________________________________________
Background
Market movements typically follow a time-varying trend channel within which prices oscillate. These oscillations—or swings—within the trend are inherently tradable.

They can be approached:
• One-sidedly, aligning with the trend (generally safer), or
• Two-sidedly, aiming to profit from mean reversions as well.

Note: Mean reversions in strong trends often manifest as sideways consolidations, making one-sided trades more stable.
________________________________________
The Parsifal Swing Suite
The modules aim to provide additional insights into the swing state within a trend and offer various trigger points to assist with entry decisions.
All modules in the suite act as weak oscillators, meaning they fluctuate within a range but are not bounded like true oscillators (e.g., RSI, which is constrained between 0% and 100%).
________________________________________
The Parsifal.Swing.Flow – Specifics
The Parsifal.Swing.Flow module aggregates price and trading flow data per bin (a "bin" refers to a single candle or time bucket) and smooths this information over recent historical data to reflect ongoing market dynamics.
________________________________________
How Swing.Flow Works
For each bin, individual data points—called "bin-infolets"—are collected. Each infolet reflects the degree and direction of trading flow, offering insight into buying and selling pressure.

The module processes this data in two steps:

1. Aggregation:
All bin-infolet values within a bin are averaged to produce a single bin-flow value.
2. Smoothing:
The resulting bin-flow values are then smoothed across multiple bins, typically using short-term EMAs.

The outcome is a dynamic representation of the current swing state based on recent trading flow activity.
________________________________________
How to Interpret Swing.Flow

• Range-bound but not a true oscillator:
While individual bin-infolets are range-bound, the Swing.Flow indicator itself is not a classical oscillator.
• Overbought/Oversold Signals:
Historically high or low values in Swing.Flow may signal overbought or oversold conditions.
• Chart Representation:
o A fast curve (orange)
o A slow curve (white)
o A shaded background that illustrates overall market state
• Mean Reversion Signals:
Extreme curve values followed by reversals may indicate the onset of a mean reversion in price.
________________________________________
Flow Background Value
The Flow Background Value represents the net state of trading flow:

• > 0 (green shading) → Bullish mode
• < 0 (red shading) → Bearish mode
• The absolute value reflects the confidence level in the current trend direction
________________________________________
How to Use the Parsifal.Swing.Flow
Several change points can act as entry point triggers:

• Fast Trigger:
A change in the slope of the fast signal curve
• Trigger:
The fast line crossing the slow line or a change in the slope of the slow signal
• Slow Trigger:
A change in the sign of the Background Value

These triggers are visualized in the accompanying chart.
Additionally, market highs and lows that align with the swing indicator values can serve as pivot points for the ongoing price process.
________________________________________
As always, this indicator is best used in conjunction with other indicators and market information.
While Parsifal.Swing.Flow offers valuable insight and potential entry points, it does not predict future price action.
Rather, it reflects the most recent market tendencies, and should therefore be applied with discretion.
________________________________________
Extensions

• Aggregation Method:
The current approach—averaging all infolets—can be replaced by alternative weighting schemes, adjusted according to:
o Historical performance
o Relevance of data
o Specific market conditions

• Smoothing Period:
The EMA-based smoothing period can be varied. In general, EMAs can be enhanced to reflect relevance-weighted probability measures, giving greater importance to recent data for a more adaptive and dynamic response.

• Advanced Smoothing:
EMAs can be further extended to include negative weights, similar to wavelet transform techniques, allowing even greater flexibility in smoothing methodologies.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.