Autonomous Compiler Agent for MetaTrader 5 – what would you build with it? - page 2

 
Alain Verleyen #:
P.S.: I think you should put aside security issue in this topic, as it's an entire other subject not specifically tied to AI.
Yes, looks like I went a little off-topic, sorry.
 
Update: I’ve now got my Python environment cleanly connected to MT5, so I can develop models and hypotheses directly in Python and test them immediately against real tick data, and the results can flow back into MT5. I’ve also integrated fundamental data, and I’m intentionally not naming the provider because I’m not trying to promote anything. Over the past weeks, I’ve automated a lot of the workflow: data retrieval, evaluation, logging, and storage are mostly running smoothly now. I’m currently putting a lot of my own money and time into this project, because I genuinely believe there is a lot of potential here. My goal is not to build “lucky backtest strategies” but systems that are robust and understandable, where you can clearly see why decisions are made. I’ll soon start publishing some fundamental analysis here on MQL5, and maybe later I’ll put some of it on YouTube. I really enjoy working with data, because sometimes it reveals patterns that most people don’t notice. In the United States, large institutional investors are required to disclose significant position changes within two days, and when you combine these filings with price structure, liquidity behavior, and macro conditions, you start to see how capital actually moves. I’m currently building a neutral network to interpret those relationships in a structured way. Something I find a bit unfortunate is that many people here work completely alone and hold on to their knowledge as if it’s something that has to remain hidden. I know that feeling, I’ve done it myself. I could keep everything I’ve learned to myself and probably benefit from that. But I don’t want to. I believe that when knowledge is shared openly, progress happens faster and in a more honest way. In the end, everyone gains more. I’m doing this because I love the work and because I genuinely believe we can go further together than any of us can alone.
 
 i've been using AI for 2yrs  and i have seen the development process getting better every month, when it comes to mql5, the best AI's for coding with less bugs is Claude (chat GPT is  very bad at code, Gemini is good for creating coding ideas). But i haven't tried the Claude terminal because i use the free version currently and stopped paying for Claude ever since i discovered Z.ai GLM 4.6 which is way cheaper than Claude, nicknamed the 3 bucks Claude killer, it has identical coding performance to Claude and can also run locally  (needs 400Gb but they said they are working on releasing a smaller model for users whom want o run it locally)
and sometimes it fixes bugs that Claude (not referring to Claude terminal) cant find. it has a larger context window than clause, and they recently added Claude as an option in  their paid version, tho i use its free version.

your questions :

  1. What do you use AI for, concretely? i use it for refactoring, tests, docs, bug-hunting and research

  2. How do you chunk code effectively? (functions 20–60 lines, modules 120–300 lines, EAs 300–1,000+—what works best for you? i don't have a  specific style, it all depends on how my prompts reacts,  )

  3. What guardrails keep you safe from hallucinations? (compiler checks, minimal repros, rigid project templates, style guides? i use several structured prompts based on most common issues i've noticed where AI's fail when handling mql5 codes, i'm not sure i can post everything here due to rules here, )

  4. Team workflows : Are you running pre-commit checks/CI with AI feedback? nope

  5. Prompts: Which prompt patterns give you consistently good MQL5 output?  first of all i will say, it depends on the AI you are using , but for less bugs i would still stick to Claude or Z ai since they produce nearly identical outputs when using same prompts 

A simple prompt optimizer
"You are to act as my prompt engineer. I would like to accomplish: (insert your goal here).Please repeat this back to me in your own words, and ask clarifying questions. Once we confirm, generate the final optimized prompt."

AI-Native task prompts

- Analyze this repo and generate 3 feature ideas Vision-stage or greenfield product

-  Identify tech debt in this file Codebases with messy or fragile logic.

-  Find duplicate logic across files Sprawling repos lacking DRY practices.

- Cluster related functions and suggest refactors Projects with lots of utils or helpers.

- Convert this function into a reusable plugin/module Componentizing logic-heavy code.

I use this when dealing with python codes before converting them to mql5

-Refactor this python function to be more amenable to parallel processing (e.g., using multiprocessing or threading)   For optimizing performance in computationally intensive Python applications.

I have several prompts that covers most of the well known AI errors when handling mql5 codes, i cant post everything here due to policies here

 
Mustafa Seyyid Sahin #:
Update: I’ve now got my Python environment cleanly connected to MT5, so I can develop models and hypotheses directly in Python and test them immediately against real tick data, and the results can flow back into MT5. I’ve also integrated fundamental data, and I’m intentionally not naming the provider because I’m not trying to promote anything. Over the past weeks, I’ve automated a lot of the workflow: data retrieval, evaluation, logging, and storage are mostly running smoothly now. I’m currently putting a lot of my own money and time into this project, because I genuinely believe there is a lot of potential here. My goal is not to build “lucky backtest strategies” but systems that are robust and understandable, where you can clearly see why decisions are made. I’ll soon start publishing some fundamental analysis here on MQL5, and maybe later I’ll put some of it on YouTube. I really enjoy working with data, because sometimes it reveals patterns that most people don’t notice. In the United States, large institutional investors are required to disclose significant position changes within two days, and when you combine these filings with price structure, liquidity behavior, and macro conditions, you start to see how capital actually moves. I’m currently building a neutral network to interpret those relationships in a structured way. Something I find a bit unfortunate is that many people here work completely alone and hold on to their knowledge as if it’s something that has to remain hidden. I know that feeling, I’ve done it myself. I could keep everything I’ve learned to myself and probably benefit from that. But I don’t want to. I believe that when knowledge is shared openly, progress happens faster and in a more honest way. In the end, everyone gains more. I’m doing this because I love the work and because I genuinely believe we can go further together than any of us can alone.
  just wanted to know how successful you were on python to mql5, i experienced some hurdles and it was huge learning curve for me. i tried several option like using mql5 to link the python code, i also tried converting the python code, extracting its core formulas and converting each of its core formulas to json to be able to maintain their structure before converting them to mql5. The second option gave me a slight closer result, which of these otions worked best for you ?

  The most consistent AI issues arise in the looping structure an arrays handing, tho i've using metatrader from mt3 to mt5 , my only problem is that i was not into coding, i focused more into strategy devising and optimization . 
 
Chike Kene Assuzu #:

AI-Native task prompts

- Analyze this repo and generate 3 feature ideas Vision-stage or greenfield product

-  Identify tech debt in this file Codebases with messy or fragile logic.

-  Find duplicate logic across files Sprawling repos lacking DRY practices.

- Cluster related functions and suggest refactors Projects with lots of utils or helpers.

- Convert this function into a reusable plugin/module Componentizing logic-heavy code.

I use this when dealing with python codes before converting them to mql5

-Refactor this python function to be more amenable to parallel processing (e.g., using multiprocessing or threading)   For optimizing performance in computationally intensive Python applications.

I have several prompts that covers most of the well known AI errors when handling mql5 codes, i cant post everything here due to policies here

Everything I quoted was an <h2> heading, and in bold. I replaced the bold heading with plain text.

Next time, poorly formatted posts will be removed.