BC Brett:
Could someone experienced in using the function, OrderCloseBy(), please explain to me how it works exactly?
Could someone experienced in using the function, OrderCloseBy(), please explain to me how it works exactly?
I've already done a search on this forum and on metaquotes.net for detailed information, but with no luck.
bool OrderCloseBy(int ticket, int opposite, color Color=CLR_NONE)
The obvious scenario is when the order that "ticket" refers to and the order that "opposite" refers to are both the same size - they both cancel eachother out completely.
But what happens when the sizes of the 2 orders are different?
1. An error code is generated and nothing is closed?
Or
2. The smaller sized order is closed (its ticket# is removed from the system) and the larger sized order (minus the size of the smaller order) stays open (its ticket# remains in the system)?
Or
3. Something else?IMHO the answer is number 2.
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
Could someone experienced in using the function, OrderCloseBy(), please explain to me how it works exactly?
I've already done a search on this forum and on metaquotes.net for detailed information, but with no luck.
bool OrderCloseBy(int ticket, int opposite, color Color=CLR_NONE)
The obvious scenario is when the order that "ticket" refers to and the order that "opposite" refers to are both the same size - they both cancel eachother out completely.
But what happens when the sizes of the 2 orders are different?
1. An error code is generated and nothing is closed?
Or
2. The smaller sized order is closed (its ticket# is removed from the system) and the larger sized order (minus the size of the smaller order) stays open (its ticket# remains in the system)?
Or
3. Something else?