# MQL5 vscode Workspace

## Set-Up
* Open Powershell terminal as Administrator 
* Execute this command `Set-ExecutionPolicy RemoteSigned`
   * Accept Execution Policy change `[A]`

## Usage
` Ctrl+Shift+B   ` Compiles Current File

Compilation will close any running MetaTrader 5 Instances and re-open them,otherwise it will not see the new compiled version of the code.

Refreshing the Navigator will fetch new version.



```PowerShell
#Comment Line 29 on Compile_MQL.ps1 to prevent compilation from closing MetaTrader5
Get-Process -Name terminal64 -ErrorAction SilentlyContinue | Where-Object { $_.Id -gt 0 } | Stop-Process 

```




## Recomended Extensions

* MQL Snippets
   * VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=nicholishen.mql-snippets
* MQL Extension Pack
   * VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=nicholishen.mql-extension-pack
* MQL-syntax-over-cpp
   * VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=nicholishen.mql-over-cpp
* ProfitRobots MQL5/MT5/MetaTrader 5 Snippets 
   * VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=sibvic.profitrobots-mq5-snippets

### Credits
https://www.mql5.com/en/blogs/post/719548