OPEN-SOURCE SCRIPT
CEF (Chaos Theory Regime Oscillator)

Chaos Theory Regime Oscillator [CEF]
This script is open to the community.
What is it?
The CEF (Chaos Entropy Fusion) Oscillator is a next-generation "Regime Analysis" tool designed to replace traditional, static momentum indicators like RSI or MACD. Unlike standard oscillators that only look at price changes, CEF analyzes the "character" of the market using concepts from Chaos Theory and Information Theory.
It combines advanced mathematical engines (Hurst Exponent, Entropy, VHF) to determine whether a price movement is a real trend or just random noise. It uses a novel "Adaptive Normalization" technique to solve scaling problems common in advanced indicators, ensuring the oscillator remains sensitive yet stable across all assets (Crypto, Forex, Stocks).
What It Promises:
Intelligent Filtering: Filters out false signals in sideways (volatile) markets using the Hurst Base to measure trend continuity.
Dynamic Adaptation: Automatically adapts to volatility. Thanks to trend memory, it doesn't get stuck at the top during uptrends or at the bottom during downtrends.
No Repainting: All signals are confirmed at the close of the bar. They don't repaint or disappear.
What It Doesn't Promise:
Magic Wand: It's a powerful analytical tool, not a crystal ball. It determines the regime, but risk management is up to the investor.
Late-Free Holy Grail: It deliberately uses advanced correction algorithms (WMA/SMA) to provide stability and filter out noise. Speed is sacrificed for accuracy.
Which Concepts Are Used for Which Purpose?
CEF is built on proven mathematical concepts while creating a unique "Fusion" mechanism. These are not used in their standard forms, but are remixed to create a consensus engine:
Hurst Exponent: Used to measure the "memory" of the time series. Tells the oscillator whether there is a probability of the trend continuing or reversing to the mean.
Vertical Horizontal Filter (VHF): Determines whether the market is in a trend phase or a congestion phase.
Shannon Entropy: Measures the "irregularity" or "unpredictability" of market data to adjust signal sensitivity.
Adaptive Normalization (Key Innovation): Instead of fixed limits, the oscillator dynamically scales itself based on recent historical performance, solving the "flat line" problem seen in other advanced scripts.
Original Methodology and Community Contribution
This algorithm is a custom synthesis of public domain mathematical theories. The author's unique contribution lies in the "Adaptive Normalization Logic" and the custom weighting of Chaos components to filter momentum.
Why Public Domain? Standard indicators (RSI, MACD) were developed for the markets of the 1970s. Modern markets require modern mathematics. This script is presented to the community to demonstrate how Regime Analysis can improve trading decisions compared to static tools.
What Problems Does It Solve?
Problem 1: The "Stagnant Market" Trap
CEF Solution: While the RSI gives false signals in a sideways market, CEF's Hurst/VHF filter suppresses the signal, essentially making the histogram "off" (or weak) during noise.
Problem 2: The "Overbought" Fallacy
CEF Solution: In a strong trend (Pump/Dump), traditional oscillators get stuck at 100 or 0. CEF uses "Trend Memory" to understand that an overbought price is not a reversal signal but a sign of trend strength, and keeps the signal green/red instead of reversing it prematurely. Problem 3: Visual Confusion
CEF Solution: Instead of multiple lines, it presents a single, color-coded histogram featuring only prominent "Smart Circles" at high-probability reversal points.
Automation Ready: Custom Alerts
CEF is designed for both manual trading and automation.
Smart Buy/Sell Circles: Visual signals that only appear when trend filters are aligned with momentum reversals.
Deviation Labels: Automatically detects and labels structural divergences between price and entropy.
Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always practice appropriate risk management.
This script is open to the community.
What is it?
The CEF (Chaos Entropy Fusion) Oscillator is a next-generation "Regime Analysis" tool designed to replace traditional, static momentum indicators like RSI or MACD. Unlike standard oscillators that only look at price changes, CEF analyzes the "character" of the market using concepts from Chaos Theory and Information Theory.
It combines advanced mathematical engines (Hurst Exponent, Entropy, VHF) to determine whether a price movement is a real trend or just random noise. It uses a novel "Adaptive Normalization" technique to solve scaling problems common in advanced indicators, ensuring the oscillator remains sensitive yet stable across all assets (Crypto, Forex, Stocks).
What It Promises:
Intelligent Filtering: Filters out false signals in sideways (volatile) markets using the Hurst Base to measure trend continuity.
Dynamic Adaptation: Automatically adapts to volatility. Thanks to trend memory, it doesn't get stuck at the top during uptrends or at the bottom during downtrends.
No Repainting: All signals are confirmed at the close of the bar. They don't repaint or disappear.
What It Doesn't Promise:
Magic Wand: It's a powerful analytical tool, not a crystal ball. It determines the regime, but risk management is up to the investor.
Late-Free Holy Grail: It deliberately uses advanced correction algorithms (WMA/SMA) to provide stability and filter out noise. Speed is sacrificed for accuracy.
Which Concepts Are Used for Which Purpose?
CEF is built on proven mathematical concepts while creating a unique "Fusion" mechanism. These are not used in their standard forms, but are remixed to create a consensus engine:
Hurst Exponent: Used to measure the "memory" of the time series. Tells the oscillator whether there is a probability of the trend continuing or reversing to the mean.
Vertical Horizontal Filter (VHF): Determines whether the market is in a trend phase or a congestion phase.
Shannon Entropy: Measures the "irregularity" or "unpredictability" of market data to adjust signal sensitivity.
Adaptive Normalization (Key Innovation): Instead of fixed limits, the oscillator dynamically scales itself based on recent historical performance, solving the "flat line" problem seen in other advanced scripts.
Original Methodology and Community Contribution
This algorithm is a custom synthesis of public domain mathematical theories. The author's unique contribution lies in the "Adaptive Normalization Logic" and the custom weighting of Chaos components to filter momentum.
Why Public Domain? Standard indicators (RSI, MACD) were developed for the markets of the 1970s. Modern markets require modern mathematics. This script is presented to the community to demonstrate how Regime Analysis can improve trading decisions compared to static tools.
What Problems Does It Solve?
Problem 1: The "Stagnant Market" Trap
CEF Solution: While the RSI gives false signals in a sideways market, CEF's Hurst/VHF filter suppresses the signal, essentially making the histogram "off" (or weak) during noise.
Problem 2: The "Overbought" Fallacy
CEF Solution: In a strong trend (Pump/Dump), traditional oscillators get stuck at 100 or 0. CEF uses "Trend Memory" to understand that an overbought price is not a reversal signal but a sign of trend strength, and keeps the signal green/red instead of reversing it prematurely. Problem 3: Visual Confusion
CEF Solution: Instead of multiple lines, it presents a single, color-coded histogram featuring only prominent "Smart Circles" at high-probability reversal points.
Automation Ready: Custom Alerts
CEF is designed for both manual trading and automation.
Smart Buy/Sell Circles: Visual signals that only appear when trend filters are aligned with momentum reversals.
Deviation Labels: Automatically detects and labels structural divergences between price and entropy.
Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always practice appropriate risk management.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.