MQL

1 program Added 2026-03-05T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: MetaQuotes Language, MetaQuotes Language 4, MetaQuotes Language 5
Provenance: commit 6f2999efce · authored 2026-03-05T12:07:19+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

3 sources · pl_id: pl/mql
LLM (this repo) · 1PldbPygments

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.mq4pygmentsprimary71.6K files
.mq5pygmentssecondary27.2K files
.mqhpygmentssecondary80.6K files

Related languages

MQL4 (0.74)MQL5 (0.74)ML (0.36)Metal (0.30)Metal Shading Language (0.30)

LLM-contributed programs

Account Info Script

Provenance: commit 6f2999efce · authored 2026-03-05T12:07:19+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.mq4 · added: 2026-03-05T10:00:00Z
//+------------------------------------------------------------------+
//|                                           SimpleScript.mq4        |
//|                        Copyright 2010, MetaQuotes Software Corp.   |
//|                                       https://www.metaquotes.net/  |
//+------------------------------------------------------------------+
#property copyright "MetaQuotes Software Corp."
#property link      "https://www.metaquotes.net/"

//+------------------------------------------------------------------+
//| Script program start function                                      |
//+------------------------------------------------------------------+
void OnStart()
  {
   double balance = AccountBalance();
   double equity  = AccountEquity();
   double margin  = AccountMargin();

   PrintFormat("Account: %s", AccountName());
   PrintFormat("Balance: %.2f %s", balance, AccountCurrency());
   PrintFormat("Equity:  %.2f %s", equity,  AccountCurrency());
   PrintFormat("Margin:  %.2f %s", margin,  AccountCurrency());
   PrintFormat("Free Margin: %.2f %s", AccountFreeMargin(), AccountCurrency());
  }

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about MQL (mapped to pl/mql). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/MQL/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← mpsx MQL4 →