Algorithmic Trading in MT4 for Complete Beginners Flashcards

1
Q

What are the three types of programs you can create with MetaEditor?

A
  • Expert Advisors
  • Indicators
  • Scripts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the comment text for MQL4?

A

//

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MQL4 - Built in function for creating messages on the screen?

A

Alert()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

MQL4 - 6 main types of variable by variable name?

A
  • int
  • double
  • string
  • bool
  • color
  • datetime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MQL4 - Create and set a variable

A

int A = 10;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

MQL4 - Equal and Not Equal To

A

== and !=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

MQL4 - Three parts of while loop and example

A
  • Statement of while
  • Expression is checked to see if it is false
  • Body of text is executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

MQL4 - Muti-Line Comments symbols

A

Start: /*
End: */

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

MQL4 - Write a for loop

A

for(int i=0; i<5; i++)
{
Alert(“Hello”);
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

MQL4 - Variable for current bid price in MT4

A

Bid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

MQL4 - Write an if/else statement

A
if (Bid < level)
{
   Alert("Low Level")
}
else
{
    Alert("High Level")
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

MQL4 - Statement used between if and else statements?

A

Else If

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

MQL4 - Statement and variable needed to have user inputs?

A
#property script_show_inputs
extern (variable declaration)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

MQL4 - How do you find help for a function?

A

Highlight and hit F1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

MQL4 - How to delay a function?

A

Sleep()

- In milliseconds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

MQL4 - Meaning of return of OrderType()

A

0 means BUY

1 means SELL

17
Q

MQL4 - Three main functions when running

A

OnInit()
OnTick()
OnDeinit()

18
Q

When is the Non-Farm and Unemployment Rates in the US released?

A

Every first Friday of every month.

19
Q

MQL4 - How To create a Global variable

A

use the static declaration before the variable declaration

20
Q

MQL4 - Create a Buy order with OrderSend()

A

ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, 10, Bid-stopLossPoint, Bid+takeProfitPoint, “Comment Here”);

21
Q

MQL4 - Create a Sell order with OrderSend()

A

ticket = OrderSend(Symbol(), OP_SELL, lots, Bid, 10, Ask+stopLossPoint, Ask-takeProfitPoint, “Comment Here”);

22
Q

MQL4 - Close Order with OrderClose()

A

bool res2;
res2 = OrderClose(ticket, lots, OrderClosePrice(),10);
if(res2 == false)
{
Alert(“Error Closing Order #: “, ticket);
}