forked from Lucas170/Chapter-2-All-Files
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyPracticeScript_Conditional.mq4
More file actions
38 lines (34 loc) · 1.2 KB
/
MyPracticeScript_Conditional.mq4
File metadata and controls
38 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//+------------------------------------------------------------------+
//| MyPracticeScript_Conditional.mq4 |
//| Copyright 2014, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.00"
#property strict
// Created by Lucas Liew
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
int x = 0;
int y = 100000;
if(x == 10) {
Print(x);
Print("I hate Mondays");
Print("I love Fridays");
if(y == 100) {
Print("I just printed a nested if");
}
} else if(x == 1000) {
Print("I'm printing the else");
} else if(y == 100) {
Print("Y is a 100");
} else {
Print("All conditions not met");
}
}
//+------------------------------------------------------------------+