How to select order with highest price?

 

Please tell me how to select order opened with highest price

thanks

 

Open orders?

Closed orders?

Opening price

 

Have 2 variables, one to store the ticket number

The other to store the price, initialised at 0 

Loop through the relevant orders

Check if price is higher than the price variable and if it is, store the ticket number in the ticket variable 

 
GumRai:

Open orders?

Closed orders?

Opening price? 

 

Have 2 variables, one to store the ticket number

The other to store the price, initialised at 0 

Loop through the relevant orders

Check if price is higher than the price variable and if it is, store the ticket number in the ticket variable 


Thanks man I made it
 
GumRai:

Check if price is higher than the price variable and if it is, store the ticket number in the ticket variable 

 Glad that you got it sorted.

I should have said 

 Check if price is higher than the price variable and if it is, store the ticket number in the ticket variable and the price in the price variable

 so that each pass through the loop it will be checking against the highest so far 

Reason: