This guide covers installation, trading styles, ready-made set files and common questions for FXEA365 AIFW AI Framework (version 1.24) on MetaTrader 5. AIFW trades any symbol you attach it to, for example XAUUSD M5, on one chart. By default a rules engine trades with no API key, no credit and no network: an H1 moving-average trend filter (by default it also requires the H4 trend to agree), an M15 RSI cross for timing, and ATR-relative stop-loss and take-profit. An optional AI layer can use OpenAI or Anthropic with your own API key, within a monthly budget you set. Every open order has a stop-loss, and the limits on positions, lot size, daily loss and drawdown run in the terminal, without the AI. No AI performance figure is claimed. Figures in this guide are as of 2026-11-09.
Installation and first run
1. Use MetaTrader 5 build 4000 or later. Hedging and netting accounts both work.
2. Open one chart of the symbol you want to trade (for example XAUUSD M5) and drag the EA onto it. Allow algorithmic trading in the Common tab.
3. Turn on Algo Trading in the terminal toolbar.
4. Without an API key, the EA runs on the rules engine only. Nothing else is needed.
5. To use the AI layer, enter your OpenAI or Anthropic key in the API KEY inputs, choose the provider (InpProvider), set a monthly budget in USD (InpMonthlyCapUsd, default 5.0), and add your provider's API address under Tools > Options > Expert Advisors > Allow WebRequest. At the budget cap the EA stops calling the API and keeps trading on the rules engine.
6. Autonomy is "Full auto" by default. We suggest "Propose only" for the first days, where every proposal waits for your confirmation on the chart panel, then "Full auto" once you are comfortable. In live trading the autonomy saved on the chart panel takes precedence over the input.
7. The terminal must stay running for the EA to manage positions. A VPS is a practical way to keep it connected.
Deposit and leverage
No minimum deposit or leverage figure is stated for this EA. By default it trades a fixed lot of 0.01 (InpRiskMode=0, InpRiskValue=0.01), with a maximum lot of 0.10 per order and in total. Check your broker's minimum lot and margin for the symbol you choose.
Trading styles and results
The trading style fills in the timeframes, SL/TP distances as ATR multiples, break-even and maximum holding time; each value can still be changed. The styles are Manual, Scalping, Day trading and Swing. No drawdown figure is published per style, and no backtest figure is published for this EA. Backtests are historical simulations, not a live record, and do not indicate future performance.
The forward test runs on an XMTrading demo account (not real money; USD account, started 2026-10-13; v1.23 since 2026-10-18; AI decisions until 2026-11-05, rules engine only since then, and the AI-period trades stay in the figures): 142 trades, -1.62%, profit factor 0.79, maximum drawdown 2.82% as of 2026-11-05. There are too few trades on the rules engine alone to judge it.
New in v1.24: the input AI min interval (InpAiMinIntervalSec, default 3600 seconds) asks the AI at most once per hour and lets the rules engine decide in between. A warning is printed at start when any AI gate (trend, SL/TP normalize, loss lock) is off; in our forward test the AI without gates lost money.
Set files
The trading style is chosen with the input InpTradeStyle (an integer: 0 = Manual, the custom inputs; 1 = Scalping; 2 = Day trading; 3 = Swing). Each set changes only the lines shown; all other inputs stay at their defaults.
Manual (default: the timeframes and ATR multiples in the inputs are used as they are)
; InpTradeStyle 0 = Manual (custom inputs)
InpTradeStyle=0
Copy these lines into a text file named AIFW_Manual.set, save it in MQL5\Presets, then load it in the EA's Inputs tab with Load.
Scalping
; InpTradeStyle 1 = Scalping
InpTradeStyle=1
Copy these lines into a text file named AIFW_Scalping.set, save it in MQL5\Presets, then load it in the EA's Inputs tab with Load.
Day trading
; InpTradeStyle 2 = Day trading
InpTradeStyle=2
Copy these lines into a text file named AIFW_DayTrading.set, save it in MQL5\Presets, then load it in the EA's Inputs tab with Load.
Swing
; InpTradeStyle 3 = Swing
InpTradeStyle=3
Copy these lines into a text file named AIFW_Swing.set, save it in MQL5\Presets, then load it in the EA's Inputs tab with Load.
Prop firm (rules engine only, no API key, with the Safety limits set to your firm's rules; no drawdown figure is published for this set)
; rules engine only: both API keys empty
InpKeyOpenAI=
InpKeyAnthropic=
; example values only - replace with limits below your firm's own daily-loss and maximum-drawdown rules
InpDailyLossPct=4.0
InpMaxDdPct=8.0
Copy these lines into a text file named AIFW_PropFirm.set, save it in MQL5\Presets, then load it in the EA's Inputs tab with Load.
InpDailyLossPct and InpMaxDdPct are off (0) by default. When the daily loss or the drawdown from the peak reaches the value you set, the EA retreats to "Propose only", so it stops opening trades on its own. The 4.0 and 8.0 above are placeholders, not tested values. "Find by target" on the chart panel can also take a max daily loss % for prop rules.
FAQ
Q: Which symbol and timeframe should I use?
A: Any symbol you attach it to; XAUUSD M5 is the example used in our checks. The rules engine reads its own trend and signal timeframes (H1 and M15 by default, or those of the selected style), so attach it to one chart only.
Q: Does it use martingale or grid?
A: No martingale or grid is part of the logic. The default is one position at a time (InpMaxPositions=1), a fixed lot of 0.01, and every new order must carry a stop-loss (InpRequireSl=true).
Q: Do I need an API key?
A: No. Without a key the EA trades on the rules engine only. A key from OpenAI or Anthropic is needed only for AI decisions, and you pay the provider directly within the monthly budget you set.
Q: Can the AI take unlimited risk?
A: No. The AI is not a risk-management layer. Its orders must agree with the rules engine's trend, its stops are reset to the rules' ATR distances, and the terminal-side limits apply to every order.
Q: Where does my data go?
A: Only to the API provider you choose. There is no licence server, no telemetry and no update system, and API keys are stored locally in the terminal.
Q: Can I use it on a prop-firm account?
A: Use the prop-firm set above with your own firm's limits. No drawdown figure is published for that configuration, so test it on a demo account first.
Q: Does it need a VPS?
A: The guards and the exits run in the terminal, so it must stay running. A VPS is a practical way to do that.
Q: What about news?
A: A news pause is available (InpNewsMinutes: no new entries N minutes around releases, 0 = off by default). Set it if you want the EA to avoid releases.
Q: Why does the Strategy Tester not show AI trades, and how do I check it before buying?
A: The tester cannot call web APIs. It replays responses recorded on a live chart when available and otherwise uses the rules engine. Run the free demo on your symbol (for example XAUUSD M5) with default inputs. Confirm every order carries a stop-loss, the coverage line reads "rules", and the guards you set stop trading where you expect.
Q: What should I do during a drawdown?
A: The forward test is currently negative. Set InpDailyLossPct and InpMaxDdPct to levels you accept, so the EA retreats to "Propose only" when they are reached, and use "Propose only" yourself while you review. The panel's "Evaluate" and "Find by target" use past data only (no AI) and are not a forecast.
Risk warning
The forward test is currently negative, and neither the rules engine nor the AI overlay promises profit; results depend on the market, the model, the profile and your settings. Backtests and panel evaluations are historical simulations and do not indicate future performance. Start on a demo account with "Propose only", and never trade money you cannot afford to lose.


