Slipage Indicator

 

Hello,

I'm looking for slipage indicator.

Thanks.

FXmann77

 

Where will the data come from?

 
Data doesn't exist, your EA will have to generate it
oo.ticket = OrderSend( ..., now.open, ... );
if (oo.ticket < 0){ ... }
else if (!OrderSelect(oo.ticket,SELECT_BY_TICKET)){ ... }
else{   static int newCount=0;  if (newCount<20) newCount++;    double
   slippage        = (OrderOpenPrice() - now.open)*DIR;  // Buy: DIR=+1, now.open=Ask
   slippage.ave   += (slippage - slippage.ave)/newCount; // Negative is good.
}
 
WHRoeder:
Data doesn't exist, your EA will have to generate it


Thnaks, I will try.

I have some question.

Somebody tell me, that if I put Slippage =0, broker can give me any slippage,

if slippage =1, only one.

It is trou?

 
phy:

Where will the data come from?


From trading platform.

If Slippage > 1;

return (0);

(No trades)

 
FXMan77:


From trading platform.

If Slippage > 1;

return (0);

(No trades)


How would you know slippage was going to be > 1 before taking a trade to find out if it slips?

 
phy:

How would you know slippage was going to be > 1 before taking a trade to find out if it slips?


To beer or not to beer!

Will be good if we can solve this problem.

 
FXMan77:


To beer or not to beer!

Will be good if we can solve this problem.


What about deviation?

 
You cannot find out the slippage before the trade takes place. Slippage is not a fixed constant, it varies depending on each trade so to predict the slippage is impossible.
 
chrisbenjy:
You cannot find out the slippage before the trade takes place. Slippage is not a fixed constant, it varies depending on each trade so to predict the slippage is impossible.


Thanks Chris,

What about delay? Delaying open a trade if slippage > 2. e.g.

 
WHRoeder:
Data doesn't exist, your EA will have to generate it

Hi,

Could you please be more specific. Thanks.


{
ticket=OrderSend(Symbol(),OP_BUY,Lots,now.open,0,0,0,"",MagicNumber,0,DarkBlue);
if ticket <0
{ ?????}
else
if (!OrderSelect(ticket,SELECT_BY_TICKET);
{????}
else
static int newCount=0;
if (newCount<20) newCount++;
double slippage = (OrderOpenPrice() - now.open)*DIR; // Buy: DIR=+1, now.open=Ask
slippage.ave+= (slippage - slippage.ave)/newCount; // Negative is good.

return(0);
}

Reason: