Optional Macro AI: Models and Setup

For version 1.17. Checked September 28, 2026. Start with the technical trading engine. Macro AI is optional and is only consulted for directional FRED scores 3 or 4 when configured.

User manual | Read HTML manual | Download PDF

Use your own QwenCloud pay-as-you-go API key with:

AI_Model = qwen3-30b-a3b-instruct-2507
AI_API_URL = https://maas.qwencloudapi.com/compatible-mode/v1/chat/completions

In MT5 Tools → Options → Expert Advisors, allow WebRequest for https://maas.qwencloudapi.com and https://api.stlouisfed.org. Put your FRED key in FRED_API_Key and provider key in AI_API_Key. Enable Enable_FRED_Macro and, if you want confirmation for scores 3/4, Enable_Macro_AI_Fallback. No API key is supplied with the product.

A separate no-trade live MT5 script using the current Macro functions fetched all four FRED series. The selected model returned HTTP 200 and an exact NO completion in 611 ms; the existing reader correctly rejected the illustrative trade. This verifies transport and response handling for that test, not a live candidate or trading benefit. It does not guarantee latency on your VPS.

The provider’s model card identifies this Instruct model as non-thinking. Qwen model card, QwenCloud API setup.

Can the EA send enable_thinking=false to every provider?

No universal setting exists across these APIs. QwenCloud supports the top-level HTTP parameter enable_thinking, but it is a provider extension. Other providers can require another field, ignore an unsupported field, or reject the request. OpenAI-compatible transport alone does not establish compatibility with every optional parameter. QwenCloud parameter reference.

The current 1.17 EA sends model and messages; it does not send enable_thinking. Use the verified non-thinking Instruct model for the current build. A future provider-specific thinking setting would require a tested EA change; it is not an existing input.

In single Python connectivity samples using the current payload, qwen3.7-flash and deepseek-v4-flash exceeded the 10-second client timeout. With explicit enable_thinking=false, they returned exact NO completions in 500 and 1016 ms respectively. Those modified payloads were not integrated into this EA release. A timeout alone does not prove its cause or the eventual provider response.

Model options from several providers

Only the first row has been tested with real credentials through this EA’s MQL Macro functions. The other rows are documentation-based options to test on demo, not certified integrations or profitability recommendations. Model availability, entitlement, IDs and provider aliases can change.

| Provider | Model ID | Full endpoint for AI_API_URL | Status | |

  • |
  • |
  • |
  • | | QwenCloud / Alibaba | qwen3-30b-a3b-instruct-2507 | https://maas.qwencloudapi.com/compatible-mode/v1/chat/completions | Verified live MQL transport/reader; preferred starting point | | OpenRouter | qwen/qwen3-30b-a3b-instruct-2507 | https://openrouter.ai/api/v1/chat/completions | Listed non-thinking model; this route not tested with EA | | Groq | llama-3.3-70b-versatile | https://api.groq.com/openai/v1/chat/completions | Listed instruction model and compatible API; not tested with EA | | Mistral | mistral-small-latest | https://api.mistral.ai/v1/chat/completions | Documented Chat Completions option; not tested with EA; alias may change |

    Sources: OpenRouter model, OpenRouter API, Groq model, Groq compatibility, Mistral migration guide.

    Use the exact model ID from the provider you purchased access from. Add that endpoint’s origin to MT5’s WebRequest allowlist. Check subscription terms and automated-application use before selecting a plan. QwenCloud Token Plan is for interactive coding/agent tools; use pay-as-you-go for the EA. Token Plan restrictions.

    Choose on measured response format, latency, reliability and cost for your use case. A larger model is not automatically a better macro trade filter. No model on this page has proven a trading improvement in this product.

    Is TypeSafe Jev suitable?

    Jev is worth evaluating for narrow, structured decisions. Its official API takes state and typed questions and returns structured answers and probabilities. That architecture may suit a small confirmation task, but it does not establish correctness on FRED or gold trading. TypeSafe introduction.

    Jev is not integrated into version 1.17. The official endpoint https://api.typesafe.ai/v1/systemone uses a different request/response contract from this EA’s Chat Completions reader. Entering jev-latest in the current model input is not sufficient. It would need a separate adapter and tests. Official Jev API example.

    Keep Jev as a research candidate. No confidence threshold, trading rule or Jev deployment is selected here.

    Keep the feature roles clear

    • The technical EA strategy and risk controls remain the trading engine.
    • FRED supplies the existing deterministic macro score and regime gate.
    • Optional Macro AI confirms configured score-3/4 cases. Invalid responses and request errors block that AI confirmation; absent FRED key/data bypasses the macro gate as documented.
    • The original high-impact news blackout remains separate.
    • Trading Economics news and FinBERT remain observation only. FinBERT still uses the external Python tokenizer.