Hướng dẫn cách dùng
Сonditional Statement if - else
NetTradeX PC
NetTradeX Android
NetTradeX iOS
NetTradeX Mobile
NetTradeX Advisors
-
User Guide for NTTX Advisors
- NetTradeX Advisors Terminal
-
Articles
-
NetTradeX Language: Introduction
- Language Basics
- Language Functions
-
Language System Objects
- Deal Management
- Order Management
- Indicators
- Object-Oriented Programming
-
DLL files
-
Object Account
-
Object Bars
-
Object Chart
-
Object datetime
-
Object History
-
Object file
-
Object Globals
-
Object Math
-
Object Symbols
-
Object System
Сonditional Statement if - else
If the expression in parentheses is true, the operator/operators listed in
curly brackets{}
are executed. If the expression within brackets is false, then the operators in {}
after the keyword else
are used.
Example:
if(price<min && price>min) { System.Print("Price is out of range"); } else { System.Print("Price is within the range"); }
The else
keyword is optional.
The statement if-else
may be used without curly brackets {
and }
, in this case, only the operator specified after if
is executed.
Example:
if(a==5) System.Print("a==5"); System.Print("regardless the value of a");