Thread: MQL4 Learning
View Single Post
  #3 (permalink)  
Old 04-30-2006, 02:49 AM
BC Brett's Avatar
BC Brett BC Brett is offline
Member
 
Join Date: Mar 2006
Location: Vancouver, British Columbia
Posts: 33
BC Brett is on a distinguished road
OrderCloseBy()

Could someone explain to me how the OrderCloseBy() function 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?
Reply With Quote