How EA understands a modified order?

 
Hi everyone.  How can I make my EA to understand that an order has neen modified manually?   Thanks in advance. 
 
macpee:
Hi everyone.  How can I make my EA to understand that an order has neen modified manually?   Thanks in advance. 
The EA could keep track of the values that were most recently set by itself for this order, such as S/L and T/P level. If it comes to reconsider the trade, let it check if those values still match, and if not, it must have been done from outside.
 
lippmaje:
The EA could keep track of the values that were most recently set by itself for this order, such as S/L and T/P level. If it comes to reconsider the trade, let it check if those values still match, and if not, it must have been done from outside.
Ok.  Pls how can I get those values.  What command to use, which excludes those placed manually? 
 
An EA uses a magic number to distinguish its own from other orders. See the sample EA (Moving Average.mq4) that came with the editor. In CalculateCurrentOrders() it iterates over all open orders and counts those that belong to its magic number. This number of course is also used when opening a new order.
 
Manually placed orders have magic number 0 zero.
This website uses cookies. Learn more about our Cookies Policy.