the highest open value from total orders

 

Hi there, i was wondering if it's possible to know the highest open value, take profit or stoploss, from all open orders:

let's say i have already 3 buy orders with open values as:

1 at 1.36610

2 at 1.36690

3 at 1.36400

and before i open another trade, run all trades and retrive the highest open of all, so it will be 1.36690

can it be done ? can any of you show me the code for that? or an area of the book that i'm not seeing.

thanks

 
OrderSelect loop
Reason: