MehaAI Trading Advisor
A smart trading advisor for MT5 that combines technical data analysis and real-time news through OpenAI.
It automatically generates buy / sell / hold signals with SL/TP levels, takes into account risk, broker restrictions, and account status, and then opens and manages trades on its own.
The advisor does not depend on the current OpenAI model. As new models appear, it will become even more powerful — you will only need to change the model name.
Analyzes the market on timeframes from M1 to MN1.
Calculates indicators: RSI, SMA(50/200), ATR, volatility, volumes, H1 support/resistance levels.
Considers news context: economy, politics, analysts’ opinions (OpenAI + web search).
Returns a structured response with action (buy/sell/hold), SL, TP, and reasoning.
Trades fully automatically: position opening/maintenance, SL/TP placement, lot calculation based on MaxRisk.
Using OpenAI gives the advisor an edge over classical algorithms:
News factor – AI can analyze current events (economy, politics, markets) and integrate them into signal formation, unlike standard indicator-based systems.
Adaptability – the model adjusts logic to changing market conditions instead of working on rigid rules.
Contextual thinking – unlike simple strategies, OpenAI evaluates the market comprehensively: technical indicators + fundamental news + risk constraints.
Reduced false signals – AI can “hold” if a setup is weak or violates risk rules, which reduces losing trades.
Improved entries – even with the same risk management strategy, OpenAI-generated signals provide more balanced SL/TP levels, accounting for volatility and market background.
⚠️ However, it’s important to understand:
AI does not guarantee profit and does not predict the future — it only improves the quality of analysis.
Final effectiveness depends on risk settings and the chosen model (gpt-5 or gpt-5-mini).
Integration with OpenAI and web search — real-time news and analytics.
Risk management — lot size is calculated from MaxRisk (balance share per trade); considers StopsLevel, FreezeLevel, lot step, margin.
Netting and hedging — bulk SL/TP setup for all positions on an instrument.
StrictDirection — on direction change, the advisor does not open counter trades to “net out”; it first reduces volume on the current side (reduce), and only if needed adds missing exposure in the signal direction (add).
Accurate net exposure logs — records NET BUY/SELL X.XX across N positions.
Safe levels — SL/TP set with ATR buffer and broker restrictions in mind (SafeMinDist).
Smart order execution:
Iteration over filling modes (IOC/FOK/RETURN),
Volume reduction on errors,
Short backoffs,
Delayed SL/TP placement (3 seconds) to exit freeze zone.
Transparency — detailed logs and optional AI response saving.
Data collection: candles (M1…MN1), indicators, levels, balance/margin/positions.
Query formation: considers MaxRisk, instrument parameters (step/min lot, Stops/Freeze, margin), and news.
AI response: action, SL, TP, short explanation.
Execution: lot calculation → position open/adjustment (with StrictDirection) → SL/TP placement.
Works on major Forex currency pairs.
Analyzes multiple timeframes simultaneously (M1…MN1).
For convenience, can be launched on H1 or H4.
⚠️ Advisor Testing
In the standard MT5 tester, WebRequest calls to OpenAI are not available, so the test results do not reflect the actual operation of the advisor.
Real effectiveness is demonstrated only during live trading on a demo or real account.
ApiKey — OpenAI key (via Inputs or Common\ApiKey.txt file).
ModelName — OpenAI model (default: gpt-5 / gpt-5-mini).
UseWebSearchTool — enable internet news.
MaxRisk — risk per trade (fraction of balance, e.g., 0.02 = 2%).
MaxLot — lot size limit.
StrictDirection — reduce-then-add mode.
RequestIntervalMinutes — AI request interval.
Candles_M1…MN1 — candle history depth per TF.
UseMockInTester / MockJSON — mock mode for tester.
SaveResponses / LogActions — save AI responses / detailed logs.
OpenAIURL, SaveApiKeyToCommonFile, FailInitIfNoApiKey — service settings.
Built-in on-chart panel:
Edit MaxRisk, MaxLot, interval, ModelName, candle depth.
Save parameters.
Load API key.
Get your API key from your OpenAI account.
⚠️ API usage is paid — billed per tokens (see Pricing on OpenAI’s website).
In MT5: Tools → Options → Expert Advisors → Allow WebRequest…
Add the address: https://api.openai.com
Enter the key:
via Inputs in expert settings;
or save it in file MQL5\Files\Common\ApiKey.txt.
New accounts start in Free Tier with request limits.
For full advisor functionality, upgrade to Usage Tier 1 — requires at least $5 spent.
Until then, use the gpt-5-mini model.
Works in both netting and hedging; for hedging, SL/TP is applied to all symbol positions.
Due to WebRequest, full tests are possible only on demo accounts.
Trading involves risk — profit is not guaranteed.
If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@fx-market.pro.
Refund requests received more than 30 days after purchase will be rejected.