Generative AI-Assisted Development of Domain-Specific Trading Automation: A Framework for Liquidity Gap Detection in MQL4

0Citations
Citations of this article
11Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

This paper presents a generative-AI-assisted methodology for developing domain-specific trading automation tools, focusing on the detection and visualization of liquidity gaps - commonly known as Fair Value Gaps (FVGs) - in derivative markets. Using the MQL4 domain-specific language (DSL) of the MetaTrader 4 (MT4) platform, we design and implement an Expert Advisor (EA) capable of identifying bullish and bearish FVGs, classifying them as mitigated or unmitigated, and rendering them as real-time visual overlays. The proposed approach leverages Copilot to accelerate code generation, reduce development time, and support iterative refinement through prompt-driven interaction. Nine refinement cycles were sufficient to converge on a stable, functionally correct implementation, reducing total development time to approximately four hours - a reduction of roughly 70% compared to a baseline manual estimate of one to two working days derived from published DSL development benchmarks. Functional correctness was validated against 150 historical bars on seven financial instruments and further confirmed through several months of live deployment processing hundreds of candles daily across a diverse set of symbols. The resulting system integrates body-based mitigation logic, multi-timeframe analysis, and optional Fibonacci-based retracement visualization to assist traders in identifying high-probability liquidity zones. The study highlights the potential of AI-assisted DSL development as a practical pathway for rapid prototyping and deployment of algorithmic trading tools, while also documenting domain-specific hallucination patterns and the iterative prompt strategies required to resolve them.

Cite

CITATION STYLE

APA

Fumanal-Andres, I. (2026). Generative AI-Assisted Development of Domain-Specific Trading Automation: A Framework for Liquidity Gap Detection in MQL4. IEEE Access, 14, 83921–83933. https://doi.org/10.1109/ACCESS.2026.3699382

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free