Logistic Up Probability
Most "AI" indicators floating around for MetaTrader either fit once offline and freeze, or quietly use future data during their own training pass. This one does neither: it is a genuinely online logistic regression, meaning it follows a strict predict-then-learn loop, one bar at a time, in the same order a trader watching the feed would experience it. At every closed bar it first computes a probability using only weights trained on strictly older data, then - and only then - uses that same bar's now-known outcome to take one stochastic gradient step. The four features are deliberately simple and cheap: one-bar momentum, multi-bar momentum, a short-SMA mean-reversion z-score, and a short-versus-long volatility ratio, each normalised by recent volatility and squashed through tanh so no single feature can dominate the fit. This is a small, transparent model, not a neural network - it will not find subtle structure a proper research pipeline could, but what it finds it finds honestly, and the rolling hit-rate label in the corner shows plainly whether it is currently doing better than a coin flip on this exact symbol and timeframe. Because training only ever uses the outcome of a bar that has already fully closed, and a value once plotted at a closed bar is never touched again, the indicator cannot repaint - the corner label's hit rate is computed the same way, from real predict-before-you-know-the-answer history, not backtested hindsight. Notes and limitations - This is a small, four-feature linear-in-the-features model. It is a genuine machine learning tool, not a claim to have solved market prediction - a rolling hit rate hovering near 50% is a real and expected outcome on many symbols and should be read as "no edge found here", not as a bug. - Weights are shared across the whole loaded history: reattaching the indicator to a much longer or shorter history, or changing timeframe, resets the model to zero weights and it has to relearn from scratch. - The rolling hit rate only reflects the window set by InpAccuracyLookback; a model that was working and has stopped will show a falling hit rate over time, not an instant flag. - This outputs a probability, not a trade signal. It does not size a position, place a stop, or account for spread and slippage.
Indicator · MT5 · v1.0 · Free
About Logistic Up Probability
Logistic Up Probability is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Momentum bars, Vol lookback and Ma fast period. MQL source code included.
Files in the download: LogisticUpProbability.ex5, LogisticUpProbability.mq5, LogisticUpProbability.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Momentum bars | 5 | Bars used for the medium-term momentum feature |
| Vol lookback | 20 | Bars used to estimate recent return volatility |
| Ma fast period | 10 | Fast SMA period for the mean-reversion feature |
| Learning rate | 0.05 | SGD step size |
| L2 decay | 0.0001 | Per-step weight shrinkage (ridge-style regularisation) |
| Accuracy lookback | 100 | Bars used for the rolling hit-rate readout |
| Alerts | true | Alert once per closed bar when probability crosses the thresholds below |
| Alert high | 65.0 | Alert when probability rises through this level |
| Alert low | 35.0 | Alert when probability falls through this level |
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: Momentum · AI & Neural Network · Alerts · MT5 Indicator · MQL5 Source Code