How to select order with highest price?

Back to topics list To post a new topic, please log in or register
avatar
11
PIPEC 2015.05.04 21:41
 

Please tell me how to select order opened with highest price

thanks

avatar
Moderator
3407
GumRai 2015.05.04 23:16 #
 

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 

avatar
11
PIPEC 2015.05.06 22:40 #
 
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
avatar
Moderator
3407
GumRai 2015.05.06 23:21 #
 
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 

Back to topics list  

To add comments, please log in or register