Where will the data come from?
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. }
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?
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?
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.
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.
Thanks Chris,
What about delay? Delaying open a trade if slippage > 2. e.g.
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);
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I'm looking for slipage indicator.
Thanks.
FXmann77