Hi everyone. How can I make my EA to understand that an order has neen modified manually? Thanks in advance.
- How can I code my profile?
- Which ChartEvent does this...?
- HOW TO ENABLE "ALLOW LIVE TRADING" AS A CODE
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.
Hi everyone. How can I make my EA to understand that an order has neen modified manually? Thanks in advance.
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?
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.
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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register