Why isn't break-even limit-order EA strategy actually break-even?

 

I'm trying to produce a break-even EA strategy which places pairs of opposing buy/sell limit orders with equally spaced s/l and t/p limits.

100% of the trades made in back-testing are loss trades and I'm finding it very hard to explain why. Here is an example:

 

                                                        size    price   s/l     t/p
1       2012.11.26 00:19        buy limit       1       0.10    1.29590 1.29585 1.29595 0.00    10000.00
2       2012.11.26 00:19        sell limit      2       0.10    1.29592 1.29597 1.29587 0.00    10000.00
3       2012.11.26 00:20        buy             1       0.10    1.29590 1.29585 1.29595 0.00    10000.00
4       2012.11.26 00:20        s/l             1       0.10    1.29585 1.29585 1.29595 -0.05   9999.95
5       2012.11.26 00:21        sell            2       0.10    1.29592 1.29597 1.29587 0.00    9999.95
6       2012.11.26 00:21        s/l             2       0.10    1.29597 1.29597 1.29587 -0.05   9999.90

This happens 100% of the time over the course of all trades placed, even if the stop-values are different (but equally spaced).

Any idea why this might be?

Cheers, Paul. 

 
Because you place yours stops inside the spread.
 
Also remember, in live trading, the order close price will almost NEVER be the SL. The SL becomes a market order.
 
angevoyageur:
Because you place yours stops inside the spread.

Forgive my ignorance, but can you explain why that would cause this behaviour?
 
WHRoeder:
Also remember, in live trading, the order close price will almost NEVER be the SL. The SL becomes a market order.


That's interesting - so, when a limit order converts into a market order when the price is hit does that event suffer from slippage as well?

 And as a counter question: a normal market order suffers from slippage when being placed and then MORE slippage when the s/l is hit?  

 
of course
 
WHRoeder:
of course

To both questions or just the last?
 
monsterer:

Forgive my ignorance, but can you explain why that would cause this behaviour?

For Buy limit order, openprice = Ask price, but for closing Bid price is used. You are using a SL of 0.5 pip (0.00005), if the spread is 1 pip, your order are immediatly closed by hitting SL.

Idem for Sell limit, but inverse Ask and Bid.

 
WHRoeder:
Also remember, in live trading, the order close price will almost NEVER be the SL. The SL becomes a market order.


Can you explain your answer a little more?  Below is a sell order in my live account that hit its stoploss, and its close price is the same as the set stoploss price.

recent sell order that was stopped out

I think (and maybe I'm wrong--I'm still a newbie, so forgive me) the question of slippage at the closing (stoploss) price could be tied to whether the broker is a market maker or non-dealing desk broker (or stp broker).  My broker is a market maker and, as such, provides instant execution for up to (I believe) 50 lots when trading the eur/usd.  That is to say--if my understanding of the term "instant execution" is correct as my broker seems to use it--that my broker keeps my trade in house (and thereby becomes my counterparty or matches my trade to an in house counter trade), rather than sending my trade to its liquidity providers; in this situation, there shouldn't be slippage except in the most extreme cases (such as very fast moving prices and/or large volume).  In the case of a non-dealing desk broker (or a stp broker), the broker has to send the stoploss order (once the stoploss price is hit) to its liquidity provider to fill the order as market order (and thereby exit the trade), and this (I believe) is were slippage could incur.  Please correct me if I'm wrong...Thanks!