mardi 17 mars 2015
Help with coding this problem
Posted on 02:21 by nice news
Hello All,
I'm trying to write some code that will enable my EA to cycle through my open buy orders, sort them by their open price from highest price to lowest price and then output the ticket number for the order which is located at a certain position which I nominate in the new ordered list.
As an example if I provide to this new code / function the number 3, I would want the new code to sort the buy orders into descending order based on their open price and in this example then provide back the ticket number for the order which is the 3rd one on the list. eg. 3rd highest.
Open Buy Orders example (before the new ordering)
Trade 1 taken : open price= 1.336
Trade 2 taken : open price=1.343
Trade 3 taken : open price= 1.375
Trade 4 taken : open price= 1.339
New List after re-ordering:
Trade 3 taken : open price= 1.375
Trade 2 taken : open price=1.343
Trade 4 taken : open price= 1.339
Trade 1 taken : open price= 1.336
ticket number result @ position 3 = 4
Does anyone know how I can do this?
I'm trying to write some code that will enable my EA to cycle through my open buy orders, sort them by their open price from highest price to lowest price and then output the ticket number for the order which is located at a certain position which I nominate in the new ordered list.
As an example if I provide to this new code / function the number 3, I would want the new code to sort the buy orders into descending order based on their open price and in this example then provide back the ticket number for the order which is the 3rd one on the list. eg. 3rd highest.
Open Buy Orders example (before the new ordering)
Trade 1 taken : open price= 1.336
Trade 2 taken : open price=1.343
Trade 3 taken : open price= 1.375
Trade 4 taken : open price= 1.339
New List after re-ordering:
Trade 3 taken : open price= 1.375
Trade 2 taken : open price=1.343
Trade 4 taken : open price= 1.339
Trade 1 taken : open price= 1.336
ticket number result @ position 3 = 4
Does anyone know how I can do this?
Help with coding this problem
Categories: Help with coding this problem
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire