This indicator combines fractal analysis, entropy, and wavelet theory to model market dynamics using a customized approach. It integrates advanced mathematical techniques to assess the complexity and structure of price action, while also incorporating volume and price volatility.
Key Concepts and Features:
Volume-Weighted Price:
The script calculates a volume-adjusted price using a moving average of volume to give more weight to periods with higher volume. This allows the indicator to account for the impact of trading volume on price movements, enhancing its sensitivity to significant price shifts.
Mexican Hat Wavelet Approximation:
The script employs the Mexican Hat Wavelet, a mathematical tool that approximates price movements based on the Laplacian of the price series. This helps capture localized oscillations in price, acting as a filter to highlight certain price dynamics over the specified length. This wavelet is commonly used to identify key inflection points and trends in financial data.
Fractal Dimension Calculation:
The fractal dimension is calculated to quantify the market's complexity. It measures how price moves between intervals, with higher values indicating chaotic or more volatile market behavior. This dimension captures the self-similarity in price movements across different time frames, a key feature of fractals.
Shannon Entropy Calculation:
Shannon Entropy is used to measure the randomness or uncertainty in the price action. It calculates the degree of unpredictability based on the price changes, providing insight into the market's informational efficiency. Higher entropy indicates more randomness, while lower entropy suggests more predictable trends.
Custom Normalization:
The script includes a custom normalization function that processes the composite score (derived from fractal dimension and entropy). This normalization helps scale the values into a consistent range, making it easier to interpret the output. The smoothing factor and RSI-based approach ensure that the normalized value reacts smoothly to the changes in market dynamics.
Composite Score:
The composite score is a weighted combination of the fractal dimension and entropy. This score aims to provide a holistic view of the market by combining the structural complexity (fractal) and randomness (entropy) into one unified metric.
Plotting and Visuals:
The indicator plots the normalized composite score on a scale where a baseline of 50 is provided for reference. The resulting plot helps traders visualize market dynamics, with the score fluctuating based on changes in the market's fractal dimension and entropy. A score above or below the baseline of 50 indicates potential market shifts.
Use Case:
The "Enhanced Fractal and Entropy Market Dynamics with Mexican Hat Wavelet" is useful for traders looking to identify market conditions where there is a balance between price structure and randomness. By integrating wavelets, fractals, and entropy, the indicator can provide insights into market complexity, helping traders recognize potential trend reversals, periods of consolidation, or increased volatility. This can be particularly effective for those employing swing trading or trend-following strategies