Download MetaTrader 5
To add comments, please log in or register
Trade with MetaTarder 5. Download it right now!
Schopenhauer
38
Schopenhauer 2014.09.16 07:12 
doesn't return open price for all position, it is only give me the price for first position,
what can i do for make it give me open price for all position which Ticket (1)
I hope it's clear
if(OrderSelect(1,SELECT_BY_TICKET)==true)_OOP_1 = OrderOpenPrice();
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.09.16 07:18  
You need to use loop and I see no loop is used here.
Schopenhauer
38
Schopenhauer 2014.09.16 07:43  
thanks . just give me example 
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.09.16 11:36  
Schopenhauer:
thanks . just give me example 
Loops and Closing or Deleting Orders
Schopenhauer
38
Schopenhauer 2014.09.17 07:07  
   for (int i=1; i<=OrdersTotal(); i++)       //Cycle for all orders..
     {                                        //displayed in the terminal
      if(OrderSelect(i-1,SELECT_BY_POS)==true)//If there is the next one
       
     }      
if(OrderSelect(1,SELECT_BY_TICKET)==true)_OOP_1 = OrderOpenPrice();

How can I get OpenPrice result with this Loop

to get always last order (1) result  

!!! 

Schopenhauer
38
Schopenhauer 2014.09.17 22:09  
ANY ONE CAN HELP ME
Keith Watford
Moderator
7990
Keith Watford 2014.09.18 01:23  
If you explained clearly what you want, then maybe somebody will be able to help you.
ffoorr
985
ffoorr 2014.09.18 10:07  

 look into the documentation the way to use Array


 double OOP[30];

  
 for (int i=0; i<OrdersTotal(); i++)       
     {                                       
      if(OrderSelect(i,SELECT_BY_POS)==true) OOP[i] = OrderOpenPrice();
       
     }   
/
To add comments, please log in or register