EA doesn't work on ECN broker

Hi all… I was testing an EA and found it didn’t work at all (generated no trades) on an ECN broker, but when I tried it on a non-ECN broker it worked fine. Any idea why this phenomenon occurs? I think I read somewhere briefly that it had something to do with market orders not being accepted on an ECN, or something like that - it didn’t make sense to me. Can anyone shed any light on this please?

Thanks!
Shawn

Based on my experience writing EAs for use on the MetaTrader platform, when placing orders with an ECN broker the EA must submit the order with NO STOP LOSS and NO TAKE PROFIT. Once the order has been placed, the EA should immediately modify the order with a stop loss and take profit.

The author of the EA should be able to confirm their EA has been tested on an ECN style account. Not just back tested, but run ‘live’ for a period of time. Sounds like that’s not the case here.

There should also be an input parameter for order slippage that will limit the range in which your order can be placed. If there is no parameter for slippage, then I would be leery about using this EA with an ECN broker. Typically slippage is 3 pips or less, however, during heavy trading this can easily spike to 10 pips or more.

Hi justhooked01,

You are half right. Your info on the placing of orders is spot on. The order must be submitted with a SL & TP set to zero. The order must then be modified…this is because when you submit a market order to an ECN broker, you cannot know what price you will get on your trade and obviously you cannot set a SL or TP for a price you do not know.

Your statement about slippage is incorrect. The slippage function of an order is ignored by a ECN broker, as is the price. You can submit a price of 0 or 1 million to an ECN broker and it makes no difference, because the broker will return you the best price he can provide.

Slippage is used by a non-ECN or instant execution broker to determine whether to execute a trade or to re-quote you. With the introduction of ECN brokers, metaquotes could not remove the slippage parameter without introducing huge complications in their platform, so it had to be left in place. There are no re-quotes with an ECN broker as you submit an order and you accept the price that is returned.

Thank you both Justhooked and Kenny - excellent answers!!

Cheers!
Shawn

Thanks for the additional input Kenny. That would explain why so many people are unhappy with ECN spreads immediately after ‘breaking news’.

Wait a minute…
Are you saying expert advisors can’t work with ECN brokers?

Yes, and no…

It depends on how the EA is coded. A ECN requires a 2 step order process and a market maker uses a single step order.

An EA that is ECN compatible will work on a Market Maker but an EA written for use at a MM will not neccessarily work at an ECN.

ummm, we’re talking as though there are lots of MT4 ECN’s!

I’m currently with fxopen ecn, but besides these guys, and perhaps mb, I’m not aware of anyone else!

Jade, FXCBS, The Collective, IBFX, PFG, ATC, etc…

You may argue that these brokers are STP and not ECN, thats fine, but they still use a 2 step order entry process and that requires the EA to be compatible.

yes exactly, that’s the point, people are getting confused between STP and ECN. FX Open is an ECN, those you mentioned are STP.