Simplify MT4/MT5 SDK Integration Using AI Agents
Market Robo is a marketplace where developers can sell trading tools such as custom indicators and trading robots. It gives developers a way to share their tools with traders while providing an SDK that helps connect these tools with the Market Robo platform. If you already have an indicator built for MetaTrader 4 or MetaTrader 5, you can use the SDK to prepare it for the Market Robo marketplace without having to build the indicator again from the beginning.
The process is simple and can be made even easier with the provided SDK documentation, Integration Prompt, and an AI-supported coding tool { SDK Integration Using AI }. You can add the SDK to your MQL project, let the AI agent help with the required changes, and then compile and test the indicator to make sure everything still works properly.
The steps below show how to take an existing MQL5 indicator, integrate it with Market Robo, check the final result, and prepare it for submission through the vendor portal.
The First Step of SDK Integration
Hello everyone, hope you are doing well. My name is Mobin, and I’m here to discuss how to integrate a custom indicator with the Market Robo SDK in order to sell it on the big marketplace of Market Robo. As you know, we are providing so many tremendous features for trading tools like indicators and robots that customers and vendors can benefit from them.
To start it, I already have an indicator written in MQL5 language for Meta Trader 5. You can use a similar process for MQL4 and Meta Trader 4. So my indicator is ready, but as you can see, my indicator has multiple include files and header files in MQH format, and we are going to integrate this indicator with the Market Robo SDK. In order to start, you want to go to themarketrobot.com. And from the top menu, you can find the SDK and integration option. Go to the SDK library, and it opens a GitHub repository for you that you can clone or download as a zip file. You must copy this zip file under the include folder of your MQL5 directory in the name of the Market Robo. Please note that you must not touch or change any code of the SDK, and you must keep it the same code and the same structure it has.
How to Use Integration Prompt with an AI Agent
So after cloning the SDK under the include folder, we are going to use a very straightforward process to integrate the SDK. Of course, you can go through the SDK docs, read the docs, and we have provided so much detailed documentation, and you can just read it and use it to refactor or integrate your indicator with that. But we also provided a file named Integration Prompt to use it in the AI agents to do it for you just very easily.
So in order to do that, I have a Cursor IDE. As you know, it is a fork of VS Code. You can use similar AI agent-supported IDEs like the free one, Anti-Gravity of Google, or any other ones, it doesn’t matter. On the Cursor, I don’t use the very expensive models. I actually use the less important or the general model of Auto, and you can see that this model even, will do the work for us.
Adding the SDK and Indicator Files
So, in order to start, we need the SDK copied into the include folder. As you can see here, I have the Market Robo SDK here. And under the docs folder, you can find the Integration Prompt. What you want to do is just copy this prompt to your AI agent, but not like this. Use Ctrl+Shift+V. And at the top, give the SDK here. I’m just showing the SDK folder. And also, I’m going to give the Readme and this Readme file to the AI agent.
Next, I want to add the indicator. The indicator file is going to be just the final file. As you can see, I have the fractal timing indicator in here, but I don’t want to change my original indicator. So I’m going to make a copy of that name, actually, let me rename it with no SDK, and the normal one is with SDK. Okay? So I’m going to give the fractal timing as the indicator here, actually.
Letting the AI Agent Plan and Build the Integration
And if you are caught in the Cursor, you need to choose the plan mode in order to plan and investigate everything, and just enter that. Please note that it may ask you questions, and these questions are probably not related to the SDK itself because we have explained everything; actually, we have explained all of the details in the SDK documentation. So everything is right for the AI agent. If it just asks you any questions, you know that it probably is related to your custom indicator, so you have to answer it.
As you can see here it didn’t ask me any questions. It is going to generate the plan. You can read it, of course, but I don’t prefer to read it, actually. So I’m just going to go with the build button and wait for it until it builds completely. Depending on the model you are using, it may take up to 5 or maybe 10 minutes sometimes, but it shouldn’t go further.
Checking and Fixing MQL5 Code
And here I can see it is almost completed. Meanwhile, I want to introduce you to a very good extension, actually, an extension of MQL5 named MQL5 C-Language. And you can use it on any fork of VS Code, and it will compile the MQL code, MQL5 or MQH code for you, and it will give you very nice features that you can use in your IDE, actually. And by that, your AI agent can even understand the probable errors or warnings, and it can fix them just like that.
So here, it has been completed, as you can see. You want to go and read the code that has been changed for you. It’s not much. You need to just check that. After that, I will accept the file, and as you can see, it didn’t change any code in my include files or other files. It just affects the final MQL5 file, which is the final indicator file.
Compiling the Integrated Indicator
So I’m going to open my Meta editor. Let’s just accept all of these changes and compile. So you can see that we have a warning, actually, here. It’s not an error. But I will copy the warning here and let the AI just deal with that. Okay, let me check that I’m in the right place. Yes, it’s the fractal timing indicator, and it’s correct. Okay, it is finished.
So I’m going back to Fractal Timing, compiling that. It is working. Let’s go to Meta Trader and try to add it to the chart. As you can see, it requests DLL imports, and we are not adding any custom DLLs; it’s just the Windows DLLs because Meta Trader does not allow indicators to connect to the server or send any HTTP requests.
SDK Testing and Handling API Key Requirements
So as you can see here, it says that API key is required and just that’s not working because it is not supposed to work, actually. So what we can do here under the SDK, we have two options for integrating. One option is disabling the SDK, although your code is fully compatible and fully integrated with the SDK, but we must have some variables defined here that you can just use to disable the SDK. But as you can see here, it wasn’t actually implemented. So I’m going to ask the AI agent that the SDK supports the enable and disable SDK using the define variable and also supports the error light level, too. I didn’t find the error light level input as well. So I’m going to investigate or ask to get the SDK fully and implement them. And I’m going to again give the resources to the AI agent and wait for it to be implemented. I hope it will do it without any problems.
Submitting the Indicator to the Market Robo Marketplace
Okay, as you can see here, the variable is added. So I’m just going to uncomment that. So the SDK must be disabled now. Zero errors. Okay, I’m going to compile it. And as you can see, it is running with the SDK actually integrated into the code, but the SDK is disabled here. So I am just going to check that all of my indicator options are working. You need to verify that. For example, I can see an issue here. Some buttons are not working. It may be related to the inputs. Let me see. No, actually. Let me reinvestigate why buttons are not working. Okay, no. I understand it.
That’s related to any bugs because it needs a wider view and it is working, no problem. Yes, it is working. So there is no problem with the indicator and it is fine. So I’m going to accept that for now. But you want to go more deeply and check every single thing on your indicator to be sure it is working. And this is my cat. So let’s go back to the Cursor and comment on this. Our indicator is ready, and it is integrated, and we are going to submit it through the vendor portal of themarketrobot.com.
Wrapping Up the Market Robo Integration
The process of linking an MQL4 or MQL5 indicator to the SDK of Market Robo is quite simple when the SDK, its documentation, and related resources are properly used. The most important thing is to leave the indicator in its original form, check the modifications made by AI, compile and test the integration properly, and ensure that every feature functions correctly when submitted through the vendor portal of Market Robo.
Follow us on:-


