Visual Studio Code - page 7

 

I use VS Code and MetaEditor in parallel. I made a colour scheme for Metaeditor resembling the default dark theme from VS Code.

[Font]
Bold=400
FaceName=Consolas
Height=12

[Colors]
Color0=1973790
Color1=11197660
Color2=16777215
Color3=7884572
Color4=3355443
Color5=14064726
Color6=5609834
Color7=11062965
Color8=578041
Color9=7901646
Color10=6908369
Color11=11197660
Color13=12845252
Color14=7901646
 
Abir Pathak #:

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?

method description

method Hover

how to the see the different overload in the hover with a scrollbar for exemple for the function OnInit() ?
2 overload

Best Reguards,
ZeroCafeine 😊

 
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 ?



Oleksandr Medviediev #:
Step-1: You need to run your MetaTrader in the portable mode.

and the following steps ?