You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I use VS Code and MetaEditor in parallel. I made a colour scheme for Metaeditor resembling the default dark theme from VS Code.
Hey guys,
I was having a problem where my variables from include paths were not coming in autocomplete list.
I followed the guide here:
https://stackoverflow.com/questions/57458423/vscode-not-recognizing-includes-from-includepath
Installed mingw gcc from:
https://www.mingw-w64.org/downloads/
This one:
Changed my c_cpp_properties.json file properties:
And now auto-complete is working fine for everything :)
My earlier "intelliSenseMode": "windows-msvc-x64",
was causing this problem. Not sure what the exact issue is. But gcc works great :)
Hope it helps others facing similar issue.
Also people facing compilation problems could use the extension compilemql4 in vscode.
I have created a keyboard shortcut for it and it works great. Only problem is that I have to Refresh the Indicators List in MT4 for it to take effect.
Please let me know if someone has found an automatic workaround for this. Thanks :)
Hi
I am using mql tools for compiling without any problem. However, when I include one mqh into another mqh, the intellisense is not working properly, not showing the public methods (I have to set the language to c++ for proper theme color coding). I tried adding the compiler and the intellisense mode to the settings.json, it is not helping. here is the settings.json :
{ "C_Cpp.default.includePath": [ "${workspaceFolder}/**", "${workspaceFolder}/Include" ], "C_Cpp.default.compilerPath": "D:\\mingw64\\bin\\gcc.exe", "C_Cpp.default.intelliSenseMode": "gcc-x64", "C_Cpp.errorSquiggles": "disabled", "C_Cpp.autocompleteAddParentheses": true, "files.exclude": { "**/*.ex4": true, "**/*.ex5": true, "**/*_@!!@.mq4": true, "**/*_@!!@.mq5": true, "**/*_@!!@.mqh": true }, "files.associations": { "*.mqh": "cpp", "*.mq4": "cpp", "*.mq5": "cpp" }, "C_Cpp.default.forcedInclude": [ "c:\\Users\\Alireza\\.vscode\\extensions\\l-i-v.mql-tools-2.1.0\\data\\mql5_en.mqh" ], "C_Cpp.clang_format_style": "file:d:\\Alpari MT5\\.clang-format", "mql_tools.Metaeditor.Include5Dir": "D:\\Alpari MT5\\MQL5\\Include", "mql_tools.Metaeditor.Metaeditor5Dir": "D:\\Alpari MT5\\metaeditor64.exe", "mql_tools.IntelliSenseUpdateDelay": 500, "mql_tools.IntelliSenseErrorSquiggles": false, "mql_tools.Script.PortableMT5": true, "mql_tools.ShowButton.Check": false, "mql_tools.ShowButton.Script": false }can you help with the problem regarding mqh files not properly being addressed in intellisense?
Hi every one
Do you know how to comment the methods of the Trade class without touching the Trade.mqh file with VSCode?
how to the see the different overload in the hover with a scrollbar for exemple for the function OnInit() ?
Best Reguards,
ZeroCafeine 😊
Hi every one
Do you know how to comment the methods of the Trade class without touching the Trade.mqh file with VSCode?
how to the see the different overload in the hover with a scrollbar for exemple for the function OnInit() ?
Best Reguards,
ZeroCafeine 😊
I've found a solution that isn't professional, but at least allows me to move forward. I make a copy of the Trade.mqh file in which I document all my methods.
Installed vscode and mqltools but the auto complete/suggestions don't work. Anyone got this working ?
Step-1: You need to run your MetaTrader in the portable mode.
and the following steps ?
Very clever.
1) How to compile from mq4 to ex4 in Visual Studio Code?
2) How to run debugging mq4 in Visual Studio Code?
Thanks.
ey, a bit late to the party but both of these are now actually possible 😄
For compiling — just hit Ctrl+Shift+B and it compiles straight from VS Code. No more batch files or PowerShell hacks. If you're editing an .mqh file it even figures out which main file to compile on its own.
For debugging — this was the missing piece for years, I know. I built it into the MQL Clangd extension. You just set your breakpoints like you would in any other language, press Ctrl+Alt+D , and the extension does the rest. It creates a temporary instrumented build behind the scenes (doesn't touch your original .ex5 ), and once you attach it to a chart you get a live panel in VS Code showing your variables, parameters, call stack — all updating as your EA runs. You can even set conditions on breakpoints, pause execution, and add // @watch comments for specific variables.
But you need an extension installed.
Extension is free and open-source — grab it from the VS Code Marketplace or MQL Clangd – Open VSX Registry. Check out the source on GitHub.
Happy to answer any questions if you run into issues setting it up.