# Question about slippage in EA code

Write articles, help other developers and make money
245
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.

21551
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.

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

245
2016.03.26 16:28
Khurram Mustafa:

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?
Moderator
28518
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.
/