Hi!
I'm operating an strategy that opens BUY-LIMIT or BUY-STOP orders.
Due to my EA limits, I need to get the information about when these orders are effected and I tried the following code:
I don't know if I really have a problem here, since every time I get the code as "0", which means a "BUY" order instead a BUY_LIMIT or BUY_STOP order.
So, is there any way I can get the specific code of these orders type, since I need to control them and not impact any other "BUY" (normal instant buy) orders?
I appreciate any help.
As I understand the orders still exist, so there are no history orders. Therefore call OrderGetInteger instead of HistoryOrderGetInteger. Furthermore, you must call OrderSelect before calling OrderGetInteger.
See https://www.mql5.com/en/docs/trading/orderselect
Also https://www.mql5.com/en/articles/211 may be helpful.- www.mql5.com
As I understand the orders still exist, so there are no history orders. Therefore call OrderGetInteger instead of HistoryOrderGetInteger. Furthermore, you must call OrderSelect before calling OrderGetInteger.
See https://www.mql5.com/en/docs/trading/orderselect
Also https://www.mql5.com/en/articles/211 may be helpful.Thank you Dr Matthias, I'll try this in some days (after finish another part of code which is burning my brain).
:D
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
I'm operating an strategy that opens BUY-LIMIT or BUY-STOP orders.
Due to my EA limits, I need to get the information about when these orders are effected and I tried the following code:
I don't know if I really have a problem here, since every time I get the code as "0", which means a "BUY" order instead a BUY_LIMIT or BUY_STOP order.
So, is there any way I can get the specific code of these orders type, since I need to control them and not impact any other "BUY" (normal instant buy) orders?
I appreciate any help.