slippage best?

Back to topics list To post a new topic, please log in or register
avatar
41
KeepMarcos 2016.04.09 02:29
 

heey! 

I will put an Expert in a VPN ..
but I can not find the forum or google if you need to set slippage or what number best suited for this. 

thank you very much people! (: 

avatar
1200
FMIC 2016.04.09 02:48 #
 

There is no "best" value for slippage as it depends on many factors.

First, you have to find out if the broker allows the slippage parameter to be set or if it is simply ignored!

Second, the slippage depends on market conditions such as price volatility and liquidity, type of strategy being used, type of orders being used, broker response time to order placement and many other factors.

A good place to start, is to visit the "Signals" section here and for the various and many signal services offered, take a look at the "Slippage" section of each of them and to analyze what the average slippage is for the many Brokers, Account Types as well as the Types of Strategies involved. This should give give you an idea of what the possible slippage values are and what you could use for your own case.

avatar
12985
WHRoeder 2016.04.09 03:24 #
 

I agree there is no best.

The value is to keep the EA in sync with the market. You send the order, loose network for a minute, then the request reaches the server. If the market has moved significantly from the sent price, the order should be rejected.

I simply use twice the spread. (some pairs like EURNOK near 5PM ET have a spread of 3000 (sic)  points.)

avatar
69
Tecuciztecatl 2016.04.09 11:31 #
 

in their advisors, I set at the two spreads

slippage=(int)NormalizeDouble(2*MarketInfo(Symbol(),MODE_SPREAD),0);

 

avatar
12985
WHRoeder 2016.04.09 13:17 #
 
Tecuciztecatl: in their advisors, I set at the two spreads
slippage=(int)NormalizeDouble(2* MarketInfo(Symbol(), MODE_SPREAD),0);
  1. Which is what I said
    slippage = int( 2.0 * (Ask - Bid) / _Point);
  2. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong

avatar
69
Tecuciztecatl 2016.04.09 14:32 #
 
WHRoeder:
Tecuciztecatl: in their advisors, I set at the two spreads
slippage=(int)NormalizeDouble(2* MarketInfo(Symbol(), MODE_SPREAD),0);
  1. Which is what I said
  2. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong

Ok, why it not specified in the reference?
Why is there always write NormalizeDouble and Digits?

avatar
41
KeepMarcos 2016.04.09 15:23 #
 
thank you all. They were useful messages!
avatar
1200
FMIC 2016.04.09 15:40 #
 

@Tecuciztecatl:

WHRoeder is correct! Use the TICKSIZE and not _Point (nor "NormalizeDouble()") to align your Price/Quote, especially with non-currencies. I learned this from experience, that this is indeed the case and that the many, many examples out there (even those by MetaQuotes) are incorrect.

avatar
12985
WHRoeder 2016.04.09 16:29 #
 
Tecuciztecatl:

Ok, why it not specified in the reference?
Why is there always write NormalizeDouble and Digits?

Because, 10+ years ago, when it was written, there was only FX and ticksize, point, and pip were identical.
avatar
119
Doerk 2016.04.10 18:09 #
 

What you can use is the CSymbolInfo class of Metatrader 5, which should work fine with MT4 too. There is a method called .NormalizePrice() which also recognizes the tick size. 

Another tricky thing is, that not only NormalizeDouble() is a problem, the equation operator used with quotes which are stored in double variables is another. It may happen, that a "if (price1==price2)" returns false when the stored quotes are actually identical. To avoid any such problems, one should also use CompareDouble() which is part of stdlib.ex4.  

PS: And also never use Print() with such doubles. It just makes headache.  

avatar
12985
WHRoeder 2016.04.11 14:02 #
 
Doerk: that a "if (price1==price2)" returns false when the stored quotes are actually identical. To avoid any such problems, one should also use CompareDouble() which is part of stdlib.ex4.
Or understand The == operand. - MQL4 forum

Back to topics list  

To add comments, please log in or register