Download MetaTrader 5

Order process between mt4 and ECN broker

To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
317845
6
317845 2015.04.08 06:04 

I need to better understand the sequence by which an order is places by the mt4 platforn using an EA. This information will assist with  EA development work now in progress.

 

 MT4 order process using an Expert Advisor through an ECN broker.

 

MT4 receives tic data. EA checks to see if order criteria are meet, if so the mt4 sends order request to broker with lot size and slippage limit.

Broker sends bid/ask spread to mt4

EA checks to ensure price is valid and confirms order

If price moves significantly before order is confirmed, then EA rejects new price and order fails.

New tic data then received and the procedure is repeated.

 Question.

Is the order only confirmed if the price set by the EA is within the bid/ask spread. Any deviation from that spread would require a re-bid. Can slippage cause the order to be filled outside the bid/ask spread if the EA has a spread limit provision?

What notation would be seen in the MQL4 log file to record that the order was filled or rejected.

Your comments would be appreciated.

 

 charlietango 

To add comments, please log in or register