select last order by a specific symbol from history

 

hello!

i need code to select last order for a specific symbol from history even if not in the same chart symbol,

for example i am on EURUSD chart but i need to select the last order with USDJPY pair from history

forgive me my bad english

any help

 
Marian85:

hello!

i need code to select last order for a specific symbol from history even if not in the same chart symbol,

for example i am on EURUSD chart but i need to select the last order with USDJPY pair from history

forgive me my bad english

any help

1. load up history with enough orders. (since last week? since yesterday?  last hour?)

2. search through orders using a backward for loop. (i.e from fresh orders to older ones)
3. if the order symbol is == USDJPY then do what you want with that order, and break the loop. (other filters along that Symbol will be needed i think)

 

thanks code 2219

but if you can just provide a simple code i would be so happy

and what about the loop is it for or while

 
Marian85:

thanks code 2219

but if you can just provide a simple code i would be so happy

and what about the loop is it for or while

there are many threads covering this similar history digging problems, even I had similar questions a month back.
you'll find it. use the search.

or i'll make up a so called "simple code" for you later, if you can't find your answer among hundreds of posts here.

 
thank you so much i'll search topics and get you back 
Reason: