Omega Ratio Oscillator
Most "risk-adjusted" oscillators reduce a window of returns to a mean and a standard deviation and stop there, which throws away everything about the shape of the distribution - two windows with the same mean and variance can have very different tails, and a Sharpe-style ratio cannot tell them apart. The Omega ratio does not summarise the distribution first; it sums the actual gains above a threshold return and divides by the actual losses below it, so skew and fat tails show up directly in the number instead of being averaged away. The threshold defaults to zero (a plain gain/pain ratio: total upside bar-return versus total downside bar-return), but can be set to any target return per bar to ask a sharper question - "how often and by how much does this instrument clear a specific bar-to-bar hurdle, versus fall short of it." A reading above 1.0 means the gains outweighed the losses relative to that threshold over the window; below 1.0 means the opposite. When the loss side of the window sums to (near) zero the ratio is mathematically unbounded, so the line is clamped to InpDisplayCap rather than plotted as infinity - a market with zero down bars in a short window is a real but temporary condition, not a signal to trust blindly. Notes and limitations - Needs InpWindow + 1 bars of history before it plots anything. - The ratio is unitless and depends heavily on InpWindow and InpThresholdPercent - values are only comparable across runs made with the same two settings. - A very short InpWindow with a strongly trending market can pin the ratio at InpDisplayCap for extended stretches; this is expected behaviour (near-zero losses), not a bug. - This measures the shape of past bar returns only. It says nothing about position sizing, spread, or execution cost, and is not a standalone trading signal.
Indicator · MT5 · v1.0 · Free
About Omega Ratio Oscillator
Omega Ratio Oscillator is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Window, Threshold percent and Display cap. MQL source code included.
Files in the download: OmegaRatioOscillator.ex5, OmegaRatioOscillator.mq5, OmegaRatioOscillator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Window | 50 | Bars of returns the ratio is computed over |
| Threshold percent | 0.0 | Threshold bar return (%) that separates gains from losses (0 = breakeven) |
| Display cap | 10.0 | Clamp the plotted ratio to this ceiling when losses are near zero |
| Alerts | true | Alert once per closed bar when the ratio crosses 1.0 |
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: Oscillator · Trailing Stop & Break-even · Alerts · MT5 Indicator · MQL5 Source Code