Free learning tools Test your finance and trading knowledge before you build, buy, or automate.
MT5 BIAS ENGINE - SOURCE INCLUDED IN PAID BUNDLE

MT5 12H Bias Engine Indicator: How the Native MQL5 Pattern Model Works

The 12H Bias Engine is designed to answer one practical question: based on similar historical OHLC conditions, is the next 12-hour path more favorable for buy pressure, sell pressure, or no trade?

Buy Full MQ5 + EX5 Bundle on Etsy - $35
MT5 12H Bias Engine indicator chart screenshot

What the Indicator Measures

The engine builds a profile from the current market context: ATR, previous candle range, body size, wick pressure, close position, momentum, tick volume, session bucket and time-of-day. It then searches historical candles for the closest matching setups and checks what happened during the forward horizon.

Directional Probability

Separates bullish and bearish target hits from no-hit cases instead of showing a blind arrow.

Expectancy

Reports buy and sell expectancy in pips after estimated cost assumptions.

Risk Flags

Warns about spread, abnormal range, tick-volume spikes and session-open volatility.

Quality Score

Combines sample count, probability, no-hit rate, expectancy and market risk.

Deep Technical Architecture

The uncommon part of this indicator is that it does not begin with a fixed crossover rule. It first converts the latest closed market behavior into a numerical feature profile, then compares that profile against historical cases. In plain language, it asks: when the market previously had a similar candle body, wick structure, ATR condition, session timing, short-term momentum and compression profile, what happened during the next 12 hours?

Feature Layer

Extracts ATR in pips, previous candle range, candle direction, momentum score, body-to-range ratio, upper/lower wick pressure, close location inside the candle, multi-candle sequence pressure and volatility compression.

Time Context

Uses minute-of-day and session classification so an Asian-session compression case is not blindly compared with a New York breakout case.

Nearest-Case Engine

Uses a native MQL5 KNN-style distance model. Historical cases with closer candle/range/momentum/session behavior receive priority over random old bars.

Forward Outcome Test

Each matched case is checked over the configured forward horizon to see whether bullish TP, bearish TP or neither side was reached.

What Makes It Different From 95% of MT5 Signal Indicators

Most public MT5 indicators on the internet are simple combinations of moving averages, RSI, arrows and alerts. They often repaint, ignore spread, ignore market context, and do not tell the trader whether the signal has any historical sample support. This engine is different because it exposes the reasoning layer: cases, probability, no-hit rate, expectancy, market risk and quality.

  • No blind arrow logic: the final decision can be HIGH QUALITY BUY, HIGH QUALITY SELL, VALID, WATCH or NO TRADE.
  • No-hit awareness: if similar cases often failed to reach either target, the signal is penalized instead of being marketed as a strong trade.
  • Expectancy separation: buy expectancy and sell expectancy are calculated separately, which helps avoid choosing a direction only because the win percentage looks attractive.
  • Cost awareness: estimated spread/slippage style costs can be included so a small historical edge is not overvalued.
  • Broker-safe levels: live buy and sell references use bid/ask-aware pricing and pip conversion settings, important for metals, JPY pairs and suffix symbols.
  • Risk suppression: abnormal range, volume spike, unsafe spread and session-open volatility can downgrade or block a signal.

How the Quality Score Is Built

The quality score is not a decorative number. It is a composite confidence layer. A setup can have one strong metric and still fail the final decision if the rest of the evidence is weak. For example, a sell case may show better bearish probability, but if no-hit rate is too high or historical expectancy is low after costs, the indicator can still print NO TRADE.

Sample Reliability

Enough historical cases must exist. A tiny sample can look impressive by accident, so weak sample depth receives a penalty.

Directional Edge

The engine checks whether bullish or bearish outcomes meaningfully dominate rather than using a tiny difference as a trade signal.

Expected Pips

The model prefers signals where the chosen side has positive expectancy after costs, not only a high raw hit count.

Market Safety

If current market conditions are unstable, risk flags reduce confidence even when the historical pattern looks good.

Practical Example

Suppose GBPJPY on M30 prints a bearish profile after a wide rejection candle. A normal indicator might instantly show a red arrow. The 12H Bias Engine instead compares that situation with past GBPJPY-like cases using candle shape, ATR, short-term sequence, session and momentum distance. If 120 closest cases show that bearish TP was reached more often, sell expectancy is positive, no-hit rate is acceptable and spread/risk flags are normal, then it can print a high-quality sell. If the same setup appears during abnormal spread or with weak expectancy, it can refuse the trade.

Limited Source Snapshot

This is a tiny architecture preview only. The full editable `.mq5` source is available in the paid Etsy bundle.

input int    InpForwardHours       = 12;
input bool   InpUseSameTimeBias    = true;
input bool   InpUseNativeKNN       = true;
input int    InpKNNNeighbors       = 120;
input double InpMinExpectancyPips  = 2.0;

double FeatureDistance(...);
void   AddForwardOutcome(...);
bool   CalculateEngine(...);

How an Amateur Trader Should Read It

If the dashboard says HIGH QUALITY SELL, that does not mean “sell blindly.” It means the most similar historical cases leaned sell-side with enough quality to pass the filter. A disciplined trader still checks spread, session, news, higher-timeframe structure and risk size. If the tool says NO TRADE, that is often the most valuable output because it tells you the current situation does not have a clean historical edge.

Technical Limitations Explained Honestly

This is a native MQL5 probability engine, not a magic prediction machine. It cannot know future news, hidden order flow, broker liquidity, central-bank surprises or the exact tick order inside old OHLC candles. Its strength is disciplined historical comparison and risk filtering. That is exactly why the indicator shows cases, no-hit percentage, expectancy and quality instead of pretending every signal is certain.

Best Keywords This Tool Targets

MT5 12H bias indicator, MT5 KNN indicator, forex bias scanner, XAUUSD bias indicator, MetaTrader 5 source code indicator, high probability MT5 signal dashboard.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×