
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
It is possible. You would need to build logic to do the following: - Persist information regarding orders the EA has closed - Continuously check the Order History pool for orders which are "in scope" but which your EA has not closed - Check sign of profit to determine whether a broker invoked SL or TP Works for me. CB
This method can be used in most MT4 Broker platform without issue, but I found it does not works in the MBTF MT4 Broker demo platform. The MBTF MT4 platform do not record any comments in the closed orders by clients(manually or EA). It is impossible to judge whether one order is closed by server or client in this kind of broker platform.
I still think MetaQuotes should add the API like as OrderCloseReason() to resolve this issue.
Hmmm.... Maybe I'm missing something, but are there any cases where the following won't be enough?
but, Here you get a solution how to do it
[...] I still think MetaQuotes should add the API like as OrderCloseReason() to resolve this issue.
Now that MT5 is out that's not likely to happen. At the most we'll get some bug fixes for MT4... I doubt there will be any new features...
Read the whole thread. This method does not take into account a situation where an order was manually closed or closed by an expert (and not by tp/sl), hence it is limited. The way to do it is via what CB suggested... No shortcuts here.
You r right have not read the whole thread, but, if it's closed by the EA Or manually the user has the way to know this the only problem is to find out if it's closed By TP or ST
This is where you come in. with your code.
You r right have not read the whole thread, but, if it's closed by the EA Or manually the user has the way to know this the only problem is to find out if it's closed By TP or ST
This is where you come in. with your code.