FXEA365 Aifw AI Framework MT4
- Experts
-
Kenichiro Sakamoto
I'm Kenichiro Sakamoto, the developer behind FXEA365 — a studio building transparent, rule-based Expert Advisors for MetaTrader 5. - Version: 1.25
- Updated: 9 November 2026
- Activations: 5
AT A GLANCE (what this EA is — no AI performance figure is claimed)
- A rules engine trades by default with no API key, no credit and no network: H1 moving-average trend filter, M15 RSI timing, ATR stop-loss and take-profit
- Optional AI layer with your own OpenAI or Anthropic API key: an AI order is executed only when it agrees with the rules engine's trend, and its stop-loss and take-profit are reset to the rules' ATR distances
- Every order has a stop-loss; max positions, max lot, daily-loss and drawdown limits run in the terminal, without the AI
- You set a monthly API budget in USD; at the cap the EA stops calling the API and keeps trading on the rules engine
- Forward test of the MT5 version (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, max drawdown 2.82% (as of 2026-11-05). Too few trades on the rules engine alone to judge.
- The Strategy Tester cannot call an AI, so the free demo shows the rules engine only.
=== LAUNCH PRICE: 3 OF 3 LEFT AT $35 ===
The price rises after every 3 purchases and keeps rising with no upper limit ($35 → $49 → $79 → $99 → $149 → …). When these copies are sold, the next price is $49.
=== MT4 EDITION ===
- Updates, new versions and sale alerts: follow the FXEA365 channel on MQL5: https://www.mql5.com/en/channels/fxea365
This is the MetaTrader 4 build of AIFW, with the same decision logic, rules engine, AI layer and chart panel as MT5 version 1.20. Differences: MetaTrader 4 has no economic calendar, so the news pause uses a fixed US schedule (NFP on the first Friday, CPI on the 10th to 15th, FOMC statement days from the Federal Reserve calendar for 2026-2027) and the news-importance input has no effect; the holiday block uses US market holidays. The MT5 version is a separate product.
Platform: MetaTrader 4 (this page).
=== BEFORE YOU BUY: WHAT TO CHECK IN THE FREE DEMO ===
The demo runs in the Strategy Tester, and the tester cannot call an AI, so the demo shows the rules engine only. That is exactly what to check: (1) attach it to your symbol (for example XAUUSD M5) with default inputs and confirm that every order carries a stop loss; (2) the tester's coverage line reads "rules", so no AI result is being simulated; (3) the terminal-side guards you set (max positions, daily loss, spread limit) stop trading where you expect. The AI layer can only be seen live with your own API key; we suggest "Propose only" for the first days. No AI performance figures are published.
AIFW is an Expert Advisor that lets a large language model (OpenAI or Anthropic,
using your own API key) act as a decision layer on top of a deterministic
rules engine. The rules engine is the default: it runs with no key, no credit
and no network. The AI can override its decisions only inside the limits the
rules define.
What it does
- Default decision layer: an H1 moving-average trend filter (H4 agreement
optional), an M15 RSI cross for timing, and ATR-relative stop loss and take
profit. Every open order has a stop loss.
- AI overlay: at a fixed interval the EA sends a compact state summary
(price, spread, account, positions, indicator values on the timeframes you
choose) to the model and receives a structured proposal: hold, open, close
or modify, with stop loss and take profit.
- AI gate: an AI open order is executed only when it agrees with the rules
engine trend direction. Its stop loss and take profit are replaced by the
same ATR-relative distances the rules use. After a losing trade, same-side
AI entries are paused for a configurable time.
- v1.24: new input AI min interval (default 3600 s): the AI is asked at most once per hour, as in our backtests, and the rules engine decides 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. Rules engine and backtest trades are unchanged.
- v1.25: fix for live trading. When the monthly AI budget was running low, the whole timer was slowed down, so the rules engine could skip M15 bars and miss signals. Now only AI calls are spaced out and the rules engine checks every bar. Backtest results are unchanged.
- Cost cap: you set a monthly API budget in USD. The EA counts tokens, slows
its interval as the budget runs down and stops calling the API when the cap
is reached. Trading continues on the rules engine.
- Backtesting: live responses are recorded. In the Strategy Tester the EA
replays recorded responses that match the same market situation and falls
back to the rules engine otherwise. The tester shows the coverage
(exact / approximate / rules) so you know what part of the test was AI.
- Terminal-side safety: max positions, max lot, max executions per day,
cooldown, daily-loss and drawdown retreat, trading sessions, weekend
cut-off, spread limit, news pause, max holding time, break-even, trailing,
partial close. These run without the AI and keep running if the AI becomes
unavailable.
- Approval mode: instead of auto execution, every proposal can wait in a
queue until you confirm it on the chart panel.
- Chart panel in 30 languages: live status, proposals, profile, rules,
connection and budget. API keys are stored locally in the terminal only.
What it does not do
- It does not promise profit. The rules engine and the AI overlay are tools;
results depend on the market, the model, the profile and your settings.
- It does not send your data anywhere except to the API provider you choose.
There is no licence server, no telemetry, no update system.
- The AI is not a risk-management layer. Risk limits are enforced by the
terminal-side rules, not by the model.
How the layers work
1. Rules engine (always on) – decides direction and SL/TP from indicators.
2. AI overlay (optional) – may replace the decision when a response arrives.
3. AI gate – keeps the AI inside the rules engine's trend and SL/TP frame.
4. Policy / guards / approval – decide whether an order is allowed at all.
Requirements
- MetaTrader 4, build 1440 or later.
- For AI decisions: an API key from OpenAI or Anthropic and the provider
domain added under Tools > Options > Expert Advisors > Allow WebRequest.
Without a key the EA trades on the
rules engine only.
- A VPS is recommended for continuous operation.
Strategy Tester note
The tester cannot call web APIs. In the tester AIFW replays recorded AI
responses when available and otherwise uses the rules engine. A tester run
therefore shows the rules engine, plus whatever recordings you have made
on a live chart. It is not a forecast of AI performance.
Inputs (main groups)
- Decision: interval in seconds.
- Rules engine: mode, MA fast/slow, RSI period and level, ATR period,
SL and TP as ATR multiples.
- AI gate: trend gate on/off, SL/TP normalisation on/off, post-loss lock
in minutes.
- LLM connection: provider, endpoint, API key, model, timeout, max tokens,
reasoning effort, record live responses.
- Budget: monthly cap in USD, token prices, max interval under budget
pressure.
- Trading constitution: allow open/close/modify, symbols, min/max lot, max
positions, max total lot, drawdown stop, cooldown, max executions per day,
require stop loss.
- Approval: auto approve on/off, approval time-to-live.
- Decision profile: name, timeframes, style (conservative / standard /
aggressive), autonomy, risk mode (fixed lot or % of balance), memory,
strategy (market data sent to the model).
- Safety: daily loss %, max drawdown %, action when AI is unavailable,
notification delay, sessions, weekend cut-off, max spread, news pause,
max holding time, break-even, trailing, partial close.
- Display: panel on/off and position, verbose log.
Recommended first setup
1. Attach to one chart (for example XAUUSD M5). Keep the default inputs.
2. Open the panel, choose the provider and model, paste your API key, set a
monthly budget you are comfortable with, and save.
3. For the first days set Autonomy to "Propose only" (Profile tab) and confirm proposals by hand. The default is "Full auto".
4. Run the Strategy Tester later with the recordings the live chart made.
Support
Documentation and updates are published on the product page. Questions are
answered in the Comments tab.
- A rules engine trades by default with no API key, no credit and no network: H1 moving-average trend filter, M15 RSI timing, ATR stop-loss and take-profit
- Optional AI layer with your own OpenAI or Anthropic API key: an AI order is executed only when it agrees with the rules engine's trend, and its stop-loss and take-profit are reset to the rules' ATR distances
- Every order has a stop-loss; max positions, max lot, daily-loss and drawdown limits run in the terminal, without the AI
- You set a monthly API budget in USD; at the cap the EA stops calling the API and keeps trading on the rules engine
- Forward test of the MT5 version (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, max drawdown 2.82% (as of 2026-11-05). Too few trades on the rules engine alone to judge.
- The Strategy Tester cannot call an AI, so the free demo shows the rules engine only.
=== LAUNCH PRICE: 3 OF 3 LEFT AT $35 ===
The price rises after every 3 purchases and keeps rising with no upper limit ($35 → $49 → $79 → $99 → $149 → …). When these copies are sold, the next price is $49.
=== MT4 EDITION ===
- Updates, new versions and sale alerts: follow the FXEA365 channel on MQL5: https://www.mql5.com/en/channels/fxea365
This is the MetaTrader 4 build of AIFW, with the same decision logic, rules engine, AI layer and chart panel as MT5 version 1.20. Differences: MetaTrader 4 has no economic calendar, so the news pause uses a fixed US schedule (NFP on the first Friday, CPI on the 10th to 15th, FOMC statement days from the Federal Reserve calendar for 2026-2027) and the news-importance input has no effect; the holiday block uses US market holidays. The MT5 version is a separate product.
Platform: MetaTrader 4 (this page).
=== BEFORE YOU BUY: WHAT TO CHECK IN THE FREE DEMO ===
The demo runs in the Strategy Tester, and the tester cannot call an AI, so the demo shows the rules engine only. That is exactly what to check: (1) attach it to your symbol (for example XAUUSD M5) with default inputs and confirm that every order carries a stop loss; (2) the tester's coverage line reads "rules", so no AI result is being simulated; (3) the terminal-side guards you set (max positions, daily loss, spread limit) stop trading where you expect. The AI layer can only be seen live with your own API key; we suggest "Propose only" for the first days. No AI performance figures are published.
AIFW is an Expert Advisor that lets a large language model (OpenAI or Anthropic,
using your own API key) act as a decision layer on top of a deterministic
rules engine. The rules engine is the default: it runs with no key, no credit
and no network. The AI can override its decisions only inside the limits the
rules define.
What it does
- Default decision layer: an H1 moving-average trend filter (H4 agreement
optional), an M15 RSI cross for timing, and ATR-relative stop loss and take
profit. Every open order has a stop loss.
- AI overlay: at a fixed interval the EA sends a compact state summary
(price, spread, account, positions, indicator values on the timeframes you
choose) to the model and receives a structured proposal: hold, open, close
or modify, with stop loss and take profit.
- AI gate: an AI open order is executed only when it agrees with the rules
engine trend direction. Its stop loss and take profit are replaced by the
same ATR-relative distances the rules use. After a losing trade, same-side
AI entries are paused for a configurable time.
- v1.24: new input AI min interval (default 3600 s): the AI is asked at most once per hour, as in our backtests, and the rules engine decides 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. Rules engine and backtest trades are unchanged.
- v1.25: fix for live trading. When the monthly AI budget was running low, the whole timer was slowed down, so the rules engine could skip M15 bars and miss signals. Now only AI calls are spaced out and the rules engine checks every bar. Backtest results are unchanged.
- Cost cap: you set a monthly API budget in USD. The EA counts tokens, slows
its interval as the budget runs down and stops calling the API when the cap
is reached. Trading continues on the rules engine.
- Backtesting: live responses are recorded. In the Strategy Tester the EA
replays recorded responses that match the same market situation and falls
back to the rules engine otherwise. The tester shows the coverage
(exact / approximate / rules) so you know what part of the test was AI.
- Terminal-side safety: max positions, max lot, max executions per day,
cooldown, daily-loss and drawdown retreat, trading sessions, weekend
cut-off, spread limit, news pause, max holding time, break-even, trailing,
partial close. These run without the AI and keep running if the AI becomes
unavailable.
- Approval mode: instead of auto execution, every proposal can wait in a
queue until you confirm it on the chart panel.
- Chart panel in 30 languages: live status, proposals, profile, rules,
connection and budget. API keys are stored locally in the terminal only.
What it does not do
- It does not promise profit. The rules engine and the AI overlay are tools;
results depend on the market, the model, the profile and your settings.
- It does not send your data anywhere except to the API provider you choose.
There is no licence server, no telemetry, no update system.
- The AI is not a risk-management layer. Risk limits are enforced by the
terminal-side rules, not by the model.
How the layers work
1. Rules engine (always on) – decides direction and SL/TP from indicators.
2. AI overlay (optional) – may replace the decision when a response arrives.
3. AI gate – keeps the AI inside the rules engine's trend and SL/TP frame.
4. Policy / guards / approval – decide whether an order is allowed at all.
Requirements
- MetaTrader 4, build 1440 or later.
- For AI decisions: an API key from OpenAI or Anthropic and the provider
domain added under Tools > Options > Expert Advisors > Allow WebRequest.
Without a key the EA trades on the
rules engine only.
- A VPS is recommended for continuous operation.
Strategy Tester note
The tester cannot call web APIs. In the tester AIFW replays recorded AI
responses when available and otherwise uses the rules engine. A tester run
therefore shows the rules engine, plus whatever recordings you have made
on a live chart. It is not a forecast of AI performance.
Inputs (main groups)
- Decision: interval in seconds.
- Rules engine: mode, MA fast/slow, RSI period and level, ATR period,
SL and TP as ATR multiples.
- AI gate: trend gate on/off, SL/TP normalisation on/off, post-loss lock
in minutes.
- LLM connection: provider, endpoint, API key, model, timeout, max tokens,
reasoning effort, record live responses.
- Budget: monthly cap in USD, token prices, max interval under budget
pressure.
- Trading constitution: allow open/close/modify, symbols, min/max lot, max
positions, max total lot, drawdown stop, cooldown, max executions per day,
require stop loss.
- Approval: auto approve on/off, approval time-to-live.
- Decision profile: name, timeframes, style (conservative / standard /
aggressive), autonomy, risk mode (fixed lot or % of balance), memory,
strategy (market data sent to the model).
- Safety: daily loss %, max drawdown %, action when AI is unavailable,
notification delay, sessions, weekend cut-off, max spread, news pause,
max holding time, break-even, trailing, partial close.
- Display: panel on/off and position, verbose log.
Recommended first setup
1. Attach to one chart (for example XAUUSD M5). Keep the default inputs.
2. Open the panel, choose the provider and model, paste your API key, set a
monthly budget you are comfortable with, and save.
3. For the first days set Autonomy to "Propose only" (Profile tab) and confirm proposals by hand. The default is "Full auto".
4. Run the Strategy Tester later with the recordings the live chart made.
Support
Documentation and updates are published on the product page. Questions are
answered in the Comments tab.
