Download MetaTrader 5
To add comments, please log in or register
Sell products right in MetaTrader. Millions of traders are waiting for this!
c0ntr0x
81
c0ntr0x 2014.07.17 00:01 

Function : 

bool  OrderCloseBy(
   int        ticket,      // ticket to close
   int        opposite,    // opposite ticket
   color      arrow_color  // color
   );

 

What is the opposite id i need and how can i get these to close the order ? Or mean that the OrderMagicNumber() ? 

 

Ty for coming help  

qjol
3243
qjol 2014.07.17 00:28  

it's ticket number not magic number

one thing you should consider

it doesn't work with all brokers

see here

c0ntr0x
81
c0ntr0x 2014.07.17 00:30  

and first ticket nr ist also ticket nr :

 OrderCloseBy(OrderTicket(),OrderTicket());
is that right ??? and ty for quick answer 
qjol
3243
qjol 2014.07.17 00:34  
see here
c0ntr0x
81
c0ntr0x 2014.07.17 01:19  

can i use these like that : 

 OrderClose( 12345); 

So i let the rest values 0 , so it takes the default value of these ticket to fully close these position ?

Ty for help at these time ;) which time zone are u ? 

qjol
3243
qjol 2014.07.17 02:10  
c0ntr0x:

can i use these like that : 

 OrderClose( 12345);



first you can't use OrderClose( 12345) and leave the rest parameters Blank or filled with 0

you must fill in the rest parameters (written below)

bool  OrderClose(
   int        ticket,      // ticket
   double     lots,        // volume
   double     price,       // close price
   int        slippage,    // slippage
   color      arrow_color  // color
   );


c0ntr0x:

So i let the rest values 0 , so it takes the default value of these ticket to fully close these position ?


there is no such thing default value

you must enter 2 ticket no. (see below)

bool  OrderCloseBy(
   int        ticket,      // ticket to close (first ticket)
   int        opposite,    // opposite ticket (second ticket)
   color      arrow_color  // color
   );
Alain Verleyen
Moderator
28522
Alain Verleyen 2014.07.17 14:49  
c0ntr0x:

can i use these like that : 

 OrderClose( 12345); 

So i let the rest values 0 , so it takes the default value of these ticket to fully close these position ?

Ty for help at these time ;) which time zone are u ? 

Don't use something you don't understand.
c0ntr0x
81
c0ntr0x 2014.07.17 16:18  
angevoyageur:
Don't use something you don't understand.


stufu - i ask to understand , so xxxx  if dont want to help ^^

qjol - how can i read out secound ticket nr ?  

 OrderTicket() // ??? These is the first ticket nr but cant find method for second nr
Alain Verleyen
Moderator
28522
Alain Verleyen 2014.07.17 18:40  
c0ntr0x:


stufu - i ask to understand , so xxxxx if dont want to help ^^

qjol - how can i read out secound ticket nr ?  

 

I suggest you to watch your language. My suggestion was serious and aimed to help you, if you don't like it, you still have to be polite.

qjol already provides you all the links needed to understand.

/
To add comments, please log in or register