Magister Mentis - A Deep Technical Overview of the Institutional AI Architecture and Beta Tester program
Magister Mentis
How It Actually Works
There is a fundamental difference between building a trading robot and building a decision engine.
Most Expert Advisors are procedural. They wait for a condition — an indicator cross, a threshold breach, a pattern completion — and they execute a predefined response. They are deterministic. They react to rules.
Magister Mentis was not designed as a rule executor. It was designed as a probabilistic inference system.
Instead of asking, “Did RSI cross 30?”, it asks:
Given the current multidimensional state of the market, what is the probability distribution of future directional bias?
Everything that follows stems from that single question.
The Market as a Classification Problem
At its core, Magister Mentis treats each closed candle as a feature vector. The model does not attempt to forecast price magnitude. It performs classification.
For each decision cycle, it outputs three values:
-
P(Down)
-
P(Neutral)
-
P(Up)
The neutral class is not decorative. It is critical. It acts as a structural uncertainty absorber. Markets are not binary systems, and forcing them into up/down logic often leads to overtrading in ambiguous zones.
The system trades only when one directional class meaningfully dominates the distribution.
The 17-Dimensional Feature Space
Every inference begins with a 17-feature vector derived from the last closed candle.
These features are not raw values. Almost all are volatility-normalized to reduce regime bias. This was a deliberate design decision during model training to mitigate overfitting to specific volatility environments.
The feature groups include:
-
Candle structure asymmetry (wick imbalance)
-
EMA directional relationship (50 vs 200), normalized by ATR
-
EMA displacement from price
-
RSI
-
ADX
-
ATR
-
Dollar index delta (real symbol if available, inverse proxy otherwise)
-
Volume delta normalized
-
Structural stability score derived from Singular Value Decomposition
-
Short-term normalized returns (1, 3, 6 bars)
-
Normalized candle range
-
Cyclical encodings of hour and weekday using sine/cosine transforms
The SVD-based stability metric deserves special mention. Rather than relying solely on momentum or oscillation, the system analyzes recent candle structure coherence. A stable singular value distribution indicates structural consistency; instability indicates regime fragmentation.
This feature engineering layer is where most robustness is created. The model is only as good as the space it observes.
Regime Detection: The Macro Filter
Before the system decides direction, it decides context.
A secondary model evaluates whether the current market is trending or ranging. It outputs a probability:
P(trend)
This is not used directly as a trading signal. Instead, it determines routing.
To prevent flip-flopping between regimes on marginal probability shifts, hysteresis thresholds are applied:
-
Enter trend mode above threshold A
-
Exit trend mode below threshold B
This ensures structural stability in model selection.
Specialist Routing
Once regime is determined, inference may be routed to a specialist:
-
Trend Brain
-
Range Brain
-
Main Brain (fallback or forced mode)
Each model has its own calibration constant. This architecture allows specialization without fragmenting execution logic.
AUTO mode routes dynamically. Manual override is possible.
Probability Calibration
Raw model outputs are rarely well-calibrated. Machine learning classifiers tend to be overconfident.
Magister Mentis applies temperature scaling:
Each brain can use a different temperature constant determined during validation.
This improves threshold reliability and prevents systematic bias from overconfident outputs.
This calibration step is one of the reasons the EA behaves more consistently across datasets.
Entry Logic: Dominance and Thresholds
A trade is not triggered simply because a probability is high.
Two conditions must be satisfied:
-
The directional probability must exceed its confidence threshold.
-
It must dominate competing classes by at least a configurable margin.
Formally:
Buy requires:
-
P(Up) ≥ BuyThreshold
-
P(Up) − max(P(Down), P(Neutral)) ≥ Margin
Sell requires the symmetric condition.
This eliminates ambiguous distributions such as:
P(Up)=0.62, P(Down)=0.59, P(Neutral)=0.05
Which might look strong but are structurally unstable.
Additionally, only one action is permitted per candle. This prevents intra-bar churn and overreaction.
Risk as a Function of Confidence
Position sizing can operate in two modes:
-
Percentage-of-equity risk
-
Fixed lot mode
In risk-based mode, lot size is derived from:
-
Account equity
-
Stop-loss distance
-
Symbol tick value conversion
-
A confidence-based scaler
The scaler increases position size moderately if probability exceeds the threshold significantly. It is bounded and capped by:
-
Broker volume limits
-
Free margin constraints
-
A hard maximum lot cap
There is no martingale logic. There is no geometric exposure increase. Loss does not trigger size expansion.
Adaptive Stop Logic
Stops and targets may be ATR-based:
SL = ATR × multiplier
TP = ATR × multiplier
This ensures volatility-adjusted risk control, particularly important for instruments such as XAUUSD where static stops become structurally inconsistent across regimes.
Trade Management Layer
Independent of entry logic, the system can apply:
-
Break-even logic at configurable R-multiples
-
Partial profit-taking
-
Regime-aware probability exit
-
Time-based exit in bars
These mechanisms operate after trade entry and are decoupled from Smart Exit (RSI exhaustion).
Institutional Shields
Two hard protection systems exist:
-
Daily drawdown limit
-
Total equity drawdown limit
If either is breached:
-
All positions are closed
-
The EA locks until reset
Soft filters include:
-
Spread filter
-
Latency filter
-
Trading hour window
-
Optional Friday close
These filters prevent structurally poor execution environments from degrading long-term performance.
Training and Overfitting Control
The model pipeline includes:
-
Multi-year data
-
Separate training, validation, and holdout test sets
-
Optuna-based hyperparameter optimization
-
Probability calibration on validation
-
Feature normalization
-
Regime specialization
The objective was not maximum backtest profit. The objective was stable probability behavior across unseen data.
Overfitting was addressed through:
-
Validation-based early stopping
-
Holdout evaluation
-
Temperature scaling
-
Normalization by ATR
No grid logic was introduced to artificially smooth equity curves.
Execution Model
All inference is executed locally inside MT5 via ONNX runtime.
There is:
-
No external API
-
No subscription dependency
-
No remote server
-
No external data transmission
The EA operates autonomously once attached.
Beta Tester Program
Magister Mentis is currently in staged evaluation.
For the first two evaluation phases, a structured beta testing window will be available.
On approximately the 26th day of each month, one designated “Beta Testing Day” will be announced.
For that day only:
-
The price will be reduced by 50%.
-
Access is granted in exchange for structured feedback.
-
Beta participants are expected to:
-
Forward test responsibly.
-
Provide written feedback.
-
Leave an honest review reflecting real experience.
-
Participation is limited and manually handled.
Interested traders may send a private message on that day to apply for the beta window.
This approach allows real-world feedback without compromising long-term product positioning.
Magister Mentis is not designed to trade constantly.
It is designed to evaluate, filter, and act only when probability alignment and structural confirmation intersect.
It waits.
Then it executes.


