Download MetaTrader 5
To add comments, please log in or register
Write articles, help other developers and make money
Darksoul
245
Darksoul 2016.03.26 15:50 

Good afternoon all, I would like to ask about the following line of code I have come across in an EA I was running:

 

int Slippage=100;  

 

What is this 100? Obviously it can't be pips. But then what is it? If I want to control the amount of slippage in an order up to say, 5 or 6 pips, what value should I input? 

 

Also from what I understand the following line is which actually does the order:   OrderSend(Symbol(), OP_SELL, Lots, op, Slippage, 0, 0, comm, Magic, 0 ,Red); 

 

Can someone please very briefly explain this function call to me? What is Symbol(), magic, 0 ,Red? Is this function the default call for market orders (meaning you want to buy or sell at current price)?

 

Any guidance would be very welcome, thank you in advance. 

Khurram Mustafa
21551
Khurram Mustafa 2016.03.26 16:08  
Darksoul:

Good afternoon all, I would like to ask about the following line of code I have come across in an EA I was running:

 

int Slippage=100;  

 

What is this 100? Obviously it can't be pips. But then what is it? If I want to control the amount of slippage in an order up to say, 5 or 6 pips, what value should I input? 

 

Also from what I understand the following line is which actually does the order:   OrderSend(Symbol(), OP_SELL, Lots, op, Slippage, 0, 0, comm, Magic, 0 ,Red); 

 

Can someone please very briefly explain this function call to me? What is Symbol(), magic, 0 ,Red? Is this function the default call for market orders (meaning you want to buy or sell at current price)?

 

Any guidance would be very welcome, thank you in advance. 

Please Read Documentation section, you will whole book "Reference"

Symbol() = Current Pair which is opened

Magic = Is the number of execution, it will be your's own

Red = Is the colour of this event happen 

Darksoul
245
Darksoul 2016.03.26 16:28  
Khurram Mustafa:

Please Read Documentation section, you will whole book "Reference"

Symbol() = Current Pair which is opened

Magic = Is the number of execution, it will be your's own

Red = Is the colour of this event happen 

Thank you for the heads up, I'm new to the site. Does slippage = 100 mean 100 points, so 10 pips?
Alain Verleyen
Moderator
28518
Alain Verleyen 2016.03.26 20:02  
Darksoul:
Thank you for the heads up, I'm new to the site. Does slippage = 100 mean 100 points, so 10 pips?
Yes 100 points.
/
To add comments, please log in or register