OrderCloseBy Ticket Problem

 

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  

 

it's ticket number not magic number

one thing you should consider

it doesn't work with all brokers

see here

 

and first ticket nr ist also ticket nr :

 OrderCloseBy(OrderTicket(),OrderTicket());
is that right ??? and ty for quick answer 
 
see here
 

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 ? 

 
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
   );
 
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.
 
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
 
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.

Reason: