Hello MQL4 community,
I am trying to add order profit values of partial order closes.
Example:
0.04 lots Order is opened,
0.01 lots closes, (I wish to save the order close profit)
0.01 lots closes, (I wish to save the order close profit)
etc. until 0.04 lots is closed.
I have been trying to use OrderSelect() function, but to no avail.
Example:
I wish to select the most recent closed partial order profit so that I can save each value and add them to see if all added partial netted orders close in profit or loss. Neither of the above functions work, any thoughts or ideas would be appreciated.
Thank you.
The OrderSelect () function is boolean therefore you need to test whether it finds the order..
if(OrderSelect(Order#, SELECT_BY_TICKET)==true) .... ...do something here with the order
If the order is in Account History the OrderCloseTime() will NOT equal zero.
sd59,
Thanks much. I'll give it a shot.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello MQL4 community,
I am trying to add order profit values of partial order closes.
Example:
0.04 lots Order is opened,
0.01 lots closes, (I wish to save the order close profit)
0.01 lots closes, (I wish to save the order close profit)
etc. until 0.04 lots is closed.
I have been trying to use OrderSelect() function, but to no avail.
Example:
I wish to select the most recent closed partial order profit so that I can save each value and add them to see if all added partial netted orders close in profit or loss. Neither of the above functions work, any thoughts or ideas would be appreciated.
Thank you.