Ehlers Cyber Cycle
An ordinary moving average lags at turning points because it averages away the short-term cycle right along with the noise it is meant to remove - there is no way for a plain average to tell the two apart. The Cyber Cycle instead runs price through a light 4-bar weighted smooth first, then applies a second-order filter (the same construction Ehlers uses for several of his cycle-based indicators) tuned by a single Alpha input. That filter is built to damp both ends at once: slow trend drift gets suppressed on one side, single-bar noise gets suppressed on the other, and what is left over is whatever is cycling at the dominant short-term period - which is why it turns noticeably closer to price's own actual swing highs and lows than a moving average of comparable smoothness does. A one-bar-lagged copy of the Cycle line is plotted as a trigger, and their crossover is the usual signal. The first couple of bars in any loaded history fall back to a plain second-difference of price rather than the full recursive filter, exactly as Ehlers' own description handles the point where no prior Cycle history yet exists. Notes and limitations - Needs roughly 9 bars of history before the first value appears; earlier bars are intentionally left empty. - Like every Ehlers cycle filter, this assumes the market currently has a dominant short-term cycle to find. In a strongly trending market with no meaningful cycling, the line still oscillates and can produce signals that are not meaningful - pair it with a trend filter rather than trading it standalone. - The first two bars in any freshly loaded history use a simplified second-difference formula instead of the full recursive filter, because no prior Cycle value exists yet to recurse against. This matches Ehlers' own published handling of the same edge case. - The forming, still-open bar can change value tick to tick as its own smooth develops through the bar - that is normal intrabar update for any live oscillator, not repainting of a closed bar.
Indicator · MT5 · v1.0 · Free
About Ehlers Cyber Cycle
Ehlers Cyber Cycle is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 2 settings, such as Alpha and Alerts. MQL source code included.
Files in the download: CyberCycle.ex5, CyberCycle.mq5, CyberCycle.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Alpha | 0.07 | Filter responsiveness: higher follows price faster but noisier |
| Alerts | true | Alert once per closed bar when Cycle crosses the trigger |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Moving Average · Alerts · MT5 Indicator · MQL5 Source Code