This article was first published on Blog – Wetalktrade.
- -
This content is synced from the rightful owners. Copyright on text and images belong to the original source.
- -


Have any programming experience? Handled any language derived from C? If the answer is yes, then handling Mql is a piece of cake for you.
But non-programmers have to be little bit more cautious.

MQL programming tutorial by Wetalktrade-syntax

MQL programming tutorial by Wetalktrade-syntax

In MQL, every statement ends in a semicolon and is called an expression. An expression can span multiple lines, and there must be a semicolon at the end.

extern double StopLoss = 15.0; // single line expression

Or this multi-line expression:

if (FastMACurrent > SlowMACurrent)
OpenBuy=true; // multi line expression

If you are new to programming, you will need to make sure you are placing the semicolon at the end of every statement. To not do so is a common newbie mistake.

The Exception To The Semicolon Rule: The Compound Operator

A compound operator is lines of code containing multiple expressions within braces {}. Compound operators can include control operators (if, switch), cycle operators (for, while) and function declarations. Below ...

To keep reading this article, please navigate to: Blog – Wetalktrade.