OPEN-SOURCE SCRIPT

Permutation Entropy Complexity Oscillator

587
Permutation Entropy (PE) Complexity Oscillator

The Permutation Entropy Complexity Oscillator is a sophisticated market regime filter that measures the "order" vs. "chaos" of price action. Unlike traditional oscillators (RSI, MACD) that rely on price values, this indicator analyzes ordinal patterns (the relative "up-down" sequence of bars).
This makes it exceptionally robust against noise and extremely fast at detecting when a market transitions from a random state into a structured trend.

How it works:

The indicator calculates the Shannon Entropy of price motifs.
High Entropy (Red Zone): The market is in a state of maximum randomness (Chaos). Ordinal patterns occur with equal probability. This is a "No-Trade" zone for trend followers.
Low Entropy (Green Zone): The market is structured and predictable. A specific pattern (e.g., constant higher highs) is dominating. This indicates a strong trending regime.

Trading Edge & Usage:

This tool is designed to be a Regime Filter, not a directional signal generator.
Avoid the "Chop": When the line is Red (High Chaos), avoid trend-following entries. The market is in a "Random Walk" phase where fakeouts are highly likely.
Confirm the Trend: When the line is Green (Predictable), the market has high structural order. This is the time to look for entries using your favorite trend-following system.
Regime Shift Alert: A drop from the Red zone into the Neutral/Green zone often precedes a massive volatility breakout. It signals that "order" is returning to the market.

Key Features:

Noise Immunity: Since it only looks at the rank of prices, it isn't fooled by sudden "fat-finger" spikes or minor gaps.
Visual Clarity: The background and line color change dynamically based on the complexity of the current market state.
V6 Optimized: Built with the latest Pine Script v6 standards for maximum performance and stability.

Settings:

Complexity Lookback: The window size for pattern analysis (Default 100).
Noise/Predictable Thresholds: Adjustable levels to fine-tune the sensitivity to market chaos.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。