Commit graph Vizion-Trading-EA/AIGateway.mqh
Author SHA1 Message Date
SahrJohn SahrJohn
400708b865 EA v7.33: AI gateway re-probes local n8n when offline (no longer stuck on public URL after starting before Docker); ping waits up to 10 s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:13:14 -06:00
SahrJohn SahrJohn
ef82f6ba79 EA v7.32: NN runs in MT5 (ONNX) instead of vizion-nn; durable nn_entries.tsv entry log; deploy probe via n8n /healthz; ONNX self-test 2026-11-10 06:24:52 -06:00
SahrJohn SahrJohn
df43f1eda0 EA v7.28: per-action gateway timeouts (validate 15 s, report/reconcile 30 s) 2026-11-09 13:07:09 -06:00
SahrJohn SahrJohn
f5d24c7bf6 EA v7.26: trade reports carry the account; rotation leader re-sends 48h of closed positions every 30 min (broker values) 2026-11-09 12:24:00 -06:00
SahrJohn SahrJohn
a7d74dfc7e EA v7.23: watchlist rotation - 20-symbol watchlist, ranker's top 10 trade; leader chart opens/closes EA charts; new symbols at 0.25 size until 20 trades 2026-11-09 09:52:25 -06:00
SahrJohn SahrJohn
ddd2899da3 EA v7.21: retry an offline AI gateway every minute
A chart that started while n8n was down (2026-11-09 03:06 US Tech 100, 03:31 Wall Street 30) stayed
gateway-offline until reloaded and, with AI_Strict_Gate, refused every trade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 03:35:29 -06:00
SahrJohn SahrJohn
526860b9cd EA: sync live build (Jul-Nov 2026) — trade report direction/setup fix, VZ indicators, risk modules
- AIGateway/profitgtx: report_trade takes direction and setup from the position's
  opening deal ("dir_src":"entry"); the closing deal inverted every direction and
  restarts lost the setup (99% "auto")
- add MATheory, RiskGuards, RiskSizing, TradePolicy (setup blocklist, strict AI gate)
- add VZ_Core + VZ_Features/MFIB/Regime/Setups/Sessions indicators, VZ_FeaturesExport
  service, VZ_DumpMA, VZ_TogglePause
- margin-aware sizing, news, labels and session updates since 2026-07-14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 13:48:22 -06:00
d920b2758a fix: correct StringToCharArray call and add XAUUSD chart template
- AIGateway.mqh: use StringLen(json_payload) instead of WHOLE_ARRAY to avoid
  null terminator being included in POST body (caused malformed JSON to gateway)
- ea_template.tpl: add XAUUSD H1 chart template for MT5 terminal setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 23:36:51 +00:00
SahrJohn SahrJohn
da0412b400 feat: update EA gateway, NN, news, and execution modules 2026-02-27 21:49:28 -06:00
4049f984ee feat: replace OpenAI with n8n AI Gateway + session + watchlist
- Remove OpenAI.mqh entirely (no direct API calls)
- Add AIGateway.mqh: unified gateway → n8n → OpenRouter → Claude
  - advisory mode: EA never fails to start (gateway down = MAYBE 0.5x)
  - mandatory mode: blocks trades if gateway unreachable
  - actions: validate_trade, get_briefing, get_session, get_news_bias,
    report_trade, watchlist_status, ping
  - includes bid/est_sl/est_tp in validate_trade payload
- Add AISession.mqh: AMD session detection (Asia/London/NY/Interbank)
  with corner chart labels showing session phase + GW status
- InputParams.mqh: AI_Mode, AI_Gateway_URL, briefing TF flags,
  AI_Session_Draw, Use_Watchlist_Gate
- GlobalVariables.mqh: gateway state, per-TF briefing cache,
  session + news headlines globals
- MasterAICoordinator.mqh: wired to AIGateway (SetUseOpenAI shim kept)
- NewsEngine.mqh: merges live AI news bias from gateway
- AISignalConfirmation.mqh: delegates to AIValidateTrade()
- AILabels.mqh: GW status (color-coded), validation stats, per-TF briefs
- ChartLabels.mqh: session label integration
- profitgtx.mq5 v7.00: OnInit init gateway + session, OnTimer multi-TF
  briefing refresh, OnTradeTransaction fire-and-forget trade report
- Recompile: 0 errors, 0 warnings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 06:34:27 +00:00