How to use VSC for mql5! Step by step tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024
  • Download VSC: code.visualstu...
    💰 Join Darwinex Zero and get 20% off: trustfultradin...
    💎 Take a FTMO prop firm challenge: trustfultradin...
    💎 5%ers prop firm: trustfultradin...
    ✅ Code your own trading bots: trustfultradin...
    ✅ Learn advanced mql5 programming: trustfultradin...
    🏛️ My broker: trustfultradin...
    🖥️ Get a good and cheap VPS: trustfultradin...
    📊 My EA: www.mql5.com/e...
    📊 SpreadRecorder: www.mql5.com/e...
    📊 DataEditor: www.mql5.com/d...
    🌐 Website: trustfultradin...
    💬Join my free Discord server: / discord
    As an algo trader I develop and trade strategies with metatrader 5.
    Automated trading makes it possible to be consistently profitable in the forex market. If you have any questions about algo trading, metatrader or programming trading systems (Expert Advisor or EA), just write a comment or visit my website. You can also join my discord server for free.
    ⚠️ Disclaimer: Some links included in the description might be affiliate links, so I might receive a tiny commission if you use my links. But there is no additional cost for you! Thanks for supporting my work. Your support allows me to keep recording the videos.
    Trading in derivative products such as futures, options, CFD's, forex and certificates contains significant risk. These products are not suitable for every investor. Investors could potentially lose all or more than the original investment. If anything, only money equal to personal risk capital should be used and can be lost without jeopardizing financial security or lifestyle. Partially or fully automated trading programs can be used to assist the trader only. Past performance is not an indication of future results. Our trading systems have been developed to the best of our knowledge and belief. Despite careful programming, errors may still exist. We do not assume any liability for errors in the programming of the trading systems. You use the trading systems on your own responsibility. You are responsible if losses occur due to the trading systems.
    Total risk notice: trustfultradin...

ความคิดเห็น • 108

  • @trustfultrading
    @trustfultrading  ปีที่แล้ว +11

    Will you use VSC in the future? Hope this was helpful 👍
    Can someone confirm this also works on macOS?

    • @baileywickens3278
      @baileywickens3278 ปีที่แล้ว

      cant get it to work on mac without using paralells which is annoying for me because it slows down my mac

    • @tobiaspucher9597
      @tobiaspucher9597 ปีที่แล้ว

      yes for sure, already did for a long time but without good setup.

    • @DAVA_MC
      @DAVA_MC 6 หลายเดือนก่อน

      Amazing video, thank you

  • @castelobtc
    @castelobtc 3 หลายเดือนก่อน

    Excellent... The class was worth it, as I already develop crypto bots in VS Code with Node Js and I didn't know about this MQL5 extension. Congratulations!

  • @XaviAndreu
    @XaviAndreu ปีที่แล้ว +3

    I love this new content

  • @mohsensrn6262
    @mohsensrn6262 22 วันที่ผ่านมา

    That was very helpful.
    Thank you

  • @nimaghomri
    @nimaghomri 6 วันที่ผ่านมา

    The reason you can't go to the definition of variables, or you have to switch to the main file to compile the project is that you didn't open the .mqproj file of the project. double click it and it will solve the problem.

  • @PathikritGhosh007
    @PathikritGhosh007 หลายเดือนก่อน

    Thank you. This was very useful!

  • @shaunhendricks6056
    @shaunhendricks6056 11 หลายเดือนก่อน

    I like your style and structure of coding

  • @zegorzki
    @zegorzki ปีที่แล้ว

    Yet another great video Toby, thank you! For others (maybe noobs like me!) unable to compile due to a missing script error, I found I needed to disable all other extensions, then restart VSC with MQL Tools enabled. I got all keen with C++ extensions and whatnot and couldn't get it to work until I realised my error. 😤😂 Sooo much better than the standard MetaEditor, true dark mode is worth it by itself for me 👍

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Fantastic! Thanks for the feedback and the tip 👍

  • @OdieO745
    @OdieO745 ปีที่แล้ว

    Tobi, great video, thanks for helping me set up my VSC program.

  • @sideshowben1982
    @sideshowben1982 ปีที่แล้ว +1

    Great Video as Usual, thanks for making leaning MQL5 so easy, interesting and informative. keep up the great works.

  • @norbertholsken2116
    @norbertholsken2116 ปีที่แล้ว

    Very cool! Thank you. Would love to switch to VS Code. Will see how it works out.

  • @maffysmods9718
    @maffysmods9718 ปีที่แล้ว

    Thanks Toby, this isa great video which is greatly appreciated, I have been looking to do this for a long time so thanks very much and keep the the good work

  • @fredysoto8547
    @fredysoto8547 ปีที่แล้ว

    Your Channel is growing!! YES!!!

  • @youtraders
    @youtraders ปีที่แล้ว

    Thanks for tutorial ❤ recommended for learning

  • @Centronimation
    @Centronimation 5 หลายเดือนก่อน

    Man you rock

  • @medironza
    @medironza ปีที่แล้ว

    Thanks for this great video. Please we need some video in your high low breakout with grid code function 🙏 and trailing sl 😊

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thanks, I don't really like mutiple entries/exits.😇

  • @jithendras5199
    @jithendras5199 4 หลายเดือนก่อน

    GOOD INFO

  • @namesurname7654
    @namesurname7654 ปีที่แล้ว

    Thanks Toby, I tried to use VSCode for MQL5 for my own while ago but have to leave it because of lack of syntax support. Right now I am wondering how did I miss this plugin :)
    Great vid as always, this weekend beer budget goes to creators of this awesome plugin!
    P.S.
    While ago I was literally one enter click away from sending request to do such vid in the comments.
    You are a some kind of a mind reader? xD Thanks a thousand!

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thanks! I also tried VSC for mql a few years ago, but have not made the switch. With this nice extension its very easy and convenient. I'm glad that you also think about the developer who offers the whole thing for free. Everyone always wants everything for free nowadays. Thanks for your comment ;)

    • @namesurname7654
      @namesurname7654 ปีที่แล้ว

      @@trustfultrading As time pass by, my personal conclusion is "Only devs pays donations to others devs" :D why? We know the effort too well.

  • @hisatnam
    @hisatnam 10 หลายเดือนก่อน

    Thanks Toby!!

  • @amirghadiri8104
    @amirghadiri8104 8 หลายเดือนก่อน

    Great card, thank you

  • @ivanshane8248
    @ivanshane8248 ปีที่แล้ว

    Thank you! this is a nicer IDE :)

  • @algorithmictradingsystems
    @algorithmictradingsystems 15 วันที่ผ่านมา

    nice

  • @AqualataCode
    @AqualataCode ปีที่แล้ว

    Wow wow! Thank you! The MQL editor is... xD

  • @adilsumra3830
    @adilsumra3830 ปีที่แล้ว

    Great Video! I started now in VSC.. Make things easier now. But I can not compile "mqh" file. It gives popup error ' To compile, you need to write in first line "mqh" of the document.' Any idea how to solve that..

  • @PathikritGhosh007
    @PathikritGhosh007 14 วันที่ผ่านมา

    Hi Toby, did what you mentioned, but still can't seem to get auto-suggestions while typing in VSCode. Any idea hat to do?

    • @trustfultrading
      @trustfultrading  12 วันที่ผ่านมา

      Hmm, hard to tell. Maybe you can write to the Extension developer about this.

    • @PathikritGhosh007
      @PathikritGhosh007 11 วันที่ผ่านมา

      @@trustfultrading Yes, thank you for your reply. I did the whole setup again after uninstalling VSCode. It's working now! The steps are correct! Something went wrong in my own configuration.

  • @weiSane
    @weiSane ปีที่แล้ว +2

    Hey Toby, I actually realised the ex5 file never gets recompiled when you compile the source code. Only the mqh file is complied. You have to go and recompile with the metaeditor for a .ex5 file to be generated.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +1

      There are two ways to compile. Use the "Compile with Script". This will open up the MetaEditor in the background and compiles the EA just fine.

    • @weiSane
      @weiSane ปีที่แล้ว +1

      @@trustfultrading I actually was using the wrong keybinding, I was using the CTR Shift Z which is just for checking syntax highlighting, my another task was using the CTR Shift X binding. it was a problem with the keybindings in the settings.json file. I went and deleted the old keybinding and now CTR Shift X works fine for compiling. Danke Tobey.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @@weiSane Ok, but there is "Check syntax", "Compile" (Ctrl+Shift+X) and there is "Compile using Script" (Ctrl+Shift+C). Using "Compile" is fine but this will not reload attached EAs. "Compile using Script" will reload already attached EAs since its using the default MetaEditor to compile.

  • @hichamlaaraj
    @hichamlaaraj 6 หลายเดือนก่อน

    👌

  • @gcs3495
    @gcs3495 ปีที่แล้ว

    thanks bro

  • @LION0500
    @LION0500 11 หลายเดือนก่อน

    Tell!
    Is it possible to create a code in MQL5 that sends any chart towards the take profit position?

  • @DAVA_MC
    @DAVA_MC 6 หลายเดือนก่อน

    Amazing video! Thanks for sharing, Toby. I wonder how does using VSC “disables” debugging. I would thing that i can always go back to Meta Editor and debug from there. But once I started using VSC - debugging in Meta Editor stopped working.. hmm.. Do i miss something?

    • @trustfultrading
      @trustfultrading  6 หลายเดือนก่อน

      Of course you can always go back to the MetaEditor. Should work, just like before ;)

  • @roofoo8053
    @roofoo8053 ปีที่แล้ว +2

    in MT5 you need to just click on the function and not highlight it to then see the definition of that function. I had the same problem and realised that this was the reason it wasn't working.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +1

      Oh thanks, I'm stupid. 😜👍

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @Nelson F1 is for help. This also works in VSC.

  • @hvfx5739
    @hvfx5739 11 หลายเดือนก่อน

    Hi Tobi! Can we use another formatter? This kills my code wery often.

  • @youtraders
    @youtraders 5 หลายเดือนก่อน

    how to generate template ser

  • @DarkKnight_2324
    @DarkKnight_2324 ปีที่แล้ว

    Nice one!
    I wish there was an extension for Intellij

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thanks, yeah the advantage is that VSC is very popular. Never used Intellij

  • @kevinnguyen6727
    @kevinnguyen6727 ปีที่แล้ว

    I have been using VSC for a time and gave up, auto-complete is not working, and we cannot call built-in functions. A simple example: assume you declared "CTrade trade;", then in the source code you typed "trade." and it can't show built-in functions like "PositionOpen" so it's very inconvenient to use.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hi, had the same problem, but it works. Do not include files from each other.
      Take a look here: github.com/L-I-V/MQL-Tools/issues/21

  • @cleverubiagegeCvland
    @cleverubiagegeCvland ปีที่แล้ว

    Very nice explanation on using vscode. Can you create an EA with Ichimoku kinko indicator? Thanks

  • @user-sl1id6mx1h
    @user-sl1id6mx1h ปีที่แล้ว

    Thanks Toby , i have a question for you , i have a grid based strategy that uses martingale and it closes trade with basket profit ( eg profit of 10$ per sequance ) , i am trying to find a way to get where exactly my exit level will be ? , can you help me

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hi, you have to test, what is best. Maybe also use a basket loss?

  • @danibaig
    @danibaig ปีที่แล้ว

    Please make video on how to make trading panel

  • @freenrg888
    @freenrg888 6 หลายเดือนก่อน

    This is brilliant, Tobias. I have been using VS Code for MQL5 for a while thanks to you.
    However, I have found one issue: When I compile in VS Code the EA's settings (inputs) do not get loaded in the Strategy Tester. I have to re-compile in the MT5 IDE and they they get loaded.
    Did you find this too?
    Everything else works perfectly.
    UPDATE:
    I have added the following in VS Code's keybindings.json:
    ...
    {
    "key": "f7",
    "command": "mql_tools.compileScript",
    "when": "resourceExtname == '.mq4' || resourceExtname == '.mq5' || resourceExtname == '.mqh'"
    },
    ...
    Now I can compile directly in MT5 with Script from VS Code by pressing F7. However, the EA's inputs are still not loaded in the MT5 Strategy tester (it shows inputs for a previously tested EA). I have to actually press F7 in the MT5 IDE and then they do get updated instantly.

    • @trustfultrading
      @trustfultrading  6 หลายเดือนก่อน

      There is compile and compile using script. With the Script it will open Metaeditor and compile the code there. Try Ctrl + shift + c

  • @kamilzawislak64
    @kamilzawislak64 ปีที่แล้ว

    good content!

  • @baileywickens3278
    @baileywickens3278 ปีที่แล้ว

    any idea why some of my colours are not right? i have blue for variables, functions and #... i dont know why most of the colours are the same but yours are so different

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Try a different color theme with ctrl + K and ctrl + T

  • @DouglasAguilar-j2i
    @DouglasAguilar-j2i 6 ชั่วโมงที่ผ่านมา

    Thompson Maria Young Patricia Thompson Mark

  • @user-uk6ql2qf1f
    @user-uk6ql2qf1f ปีที่แล้ว

    hello,i got an error during compile, the error message is "command 'mql_tools.compileFile' not found"

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hi, I had that too once. I just restarted VSC. Let me know if that helps.

    • @PrasenjitFx
      @PrasenjitFx ปีที่แล้ว

      I am also facing this problem. Restart laptop several times but till now facing same. Is there any other solution

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @@PrasenjitFx What if you just restart VSC? Just close it and open it again?

    • @PrasenjitFx
      @PrasenjitFx ปีที่แล้ว

      @@trustfultrading thanks dear tobi . I restart vsc many times but didn't work but when turn on sync on and log in with GitHub it's working now.

  • @JhonyTygas
    @JhonyTygas ปีที่แล้ว

    Good morning, very good your video, a doubt can we create graphical interfaces with VS CODE for the mql5 EA?

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +1

      Thanks, yeah the VS CODE is just the code editor. You can create a GUI ;)

  • @jakebudin4354
    @jakebudin4354 ปีที่แล้ว

    vs code hypeee!

  • @brunoyu403
    @brunoyu403 ปีที่แล้ว

    Thanks Toby, i learn a lot from you.
    i got a quick question, my VSC checks my mq5 file using the C/C++ extentison, always gives a warning of the incorrect syantex as it's not C/C++, event the "input" function.
    and i found that MQL tools needs the C/C++ intelliSense extension.... seems it can not be stopped.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thanks for watching! Can you post your settings.json file?

    • @brunoyu403
      @brunoyu403 ปีที่แล้ว

      @@trustfultrading thanks for the reply, here is the setting.json
      ======
      {
      "C_Cpp.errorSquiggles": "disabled"
      }
      =========
      and also the VSC can not auto complete the code, neither Mqltick or input...
      maybe there is sth wrong with the setting.
      Thanks in advance for your help

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @@brunoyu403 Ok there is a lot missing there. Have you done step 2 of the MQL Tools guide? Create the config file?

    • @brunoyu403
      @brunoyu403 ปีที่แล้ว

      @@trustfultrading i trid the "create config" many times, but nothing happen. sometimes it popped up an warning that "mql tools configration not found".

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @@brunoyu403 Try to paste this in your settings.json file ( and edit the path):
      {
      "C_Cpp.default.includePath": [
      "${workspaceFolder}/**",
      "${workspaceFolder}/Include"
      ],
      "C_Cpp.default.compilerPath": "",
      "C_Cpp.default.intelliSenseMode": "gcc-x64",
      "C_Cpp.errorSquiggles": "disabled",
      "C_Cpp.autocompleteAddParentheses": true,
      "mql_tools.context": true,
      "files.exclude": {
      "**/*.ex4": true,
      "**/*.ex5": true
      },
      "files.associations": {
      "*.mqh": "cpp",
      "*.mq4": "cpp",
      "*.mq5": "cpp",
      "*.0mqh": "cpp"
      },
      "C_Cpp.default.forcedInclude": [
      "c:\\Users\\Tobias\\.vscode\\extensions\\l-i-v.mql-tools-2.0.1\\data\\mql5_en.mqh"
      ]
      }

  • @shagarcool
    @shagarcool 8 หลายเดือนก่อน

    Great tool

  • @JaraMoni-x9o
    @JaraMoni-x9o 3 วันที่ผ่านมา

    Allen Mary Garcia Melissa Hall Nancy

  • @fredysoto8547
    @fredysoto8547 ปีที่แล้ว

    Thanks a lot Tobi, but My Laptop y slow with VSC, so I keep working with MQL5 IDE, is there some issue to follow your Great Videos?.. Regards!!

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +1

      Ah ok, code will be the same for MetaEditor / VSC.

    • @fredysoto8547
      @fredysoto8547 ปีที่แล้ว

      @@trustfultrading Thanks a lot

  • @peschu3659
    @peschu3659 ปีที่แล้ว

    @trustfultrading Vielen Dank für Deine Videos Tobi! They are very helpful to get started quickly with mql/ea programming. One question about the formatting: In vscode I use the option to automatically format the file on save.
    This "destroys" the formatting in variable/input defintions. The best I can achieve at the moment is to keep the comments vertically aligned.
    But I would like to keep the variable names and equal signs vertically aligned. Do you know how to configure this in vscode? There are also some ugly breaks in "if" conditions, when the line gets too long ...
    Would be great to see a video about some fine tuning in vscode. 🙂
    Thanks a lot again for all the work and time you put into these videos!!!

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hmmm, write me on telegram so you can send me a screenshot.

    • @hvfx5739
      @hvfx5739 11 หลายเดือนก่อน

      Hi @peschu3659 hast du schon das Probleme behoben?

  • @yourworld...3699
    @yourworld...3699 ปีที่แล้ว

    Hello Toby,,,, Is it possible to get CNBC data using mql5?

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hi, you can write a web request for any website.
      www.mql5.com/en/docs/network/webrequest

    • @yourworld...3699
      @yourworld...3699 ปีที่แล้ว

      @@trustfultrading thank you

  • @Noswebeamus
    @Noswebeamus ปีที่แล้ว

    Right, who knows what the hell they were thinking using that too old GUI!

  • @MQLwithBrian
    @MQLwithBrian ปีที่แล้ว

    For those who use Crossover app to run MT5 and MQL5 on mac, No success. I can edit in VS but can't compile. Maybe for those who directly installed MT5 and MQL5 it will work

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thank you for the info, may I ask which "crossover app" you are using? And why? Or is the app called "crossover"? ;)

    • @MQLwithBrian
      @MQLwithBrian ปีที่แล้ว

      Newer versions of mac can't run MT5 properly. Alternatively, we can use emulations or install Windows to run .exe files. So Parrallels, Wine, Bootstrap, or Crossover is the option. (CrossOver is stable atleast for my experience). Yeah f*ck macbook 🤣

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      @@MQLwithBrian Oh sorry to hear that. But thats really a problem with MT5 not macbook. 😑
      Maybe this helps: github.com/L-I-V/MQL-Tools/issues/8
      Maybe the path has to start with "crossover" or something... idk

  • @ilyaskhan.1994
    @ilyaskhan.1994 ปีที่แล้ว

    Lack of debugger : (

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Yeah, do you use the debugger in MetaEditor?

    • @ilyaskhan.1994
      @ilyaskhan.1994 ปีที่แล้ว

      @@trustfultrading sometimes yeah