How to find back in my EA The open orders which are into "trading" of MT4

 

ya, because your ea maybe error open price invalid..

so will not open position...

 

Hi,

Good day,

all you need to do is to check out what messages you have in the journal.

Post them here and then we can see what's going on.

Best wishes,

SF

 
scarface:

Hi,

Good day,

all you need to do is to check out what messages you have in the journal.

Post them here and then we can see what's going on.

Best wishes,

SF


Thank you very much,

My EA is going very well but it knows that the positions it has managed since it was opened, because, as the positions are in RAM only and not on a file.

Now, I need my EA knows all the positions it has open and which are saved in the "trading" of MT4.
My question is: how to import this file into my EA with its name, its structure, its parameters ....
 
    for(int pos=0; pos < HistoryTotal(); pos++) if (
        OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY)   // Only orders
    &&  OrderMagicNumber()  == magic.number             // w/ my magic number,
    &&  OrderSymbol()       == Symbol()                 // and my pair.
    &&  OrderType()         <= OP_SELL){    // Avoid cr/bal https://forum.mql4.com/32363
 
WHRoeder:


Thank you very mutch, but I I wanted all the positions are still open, some of which are no longer in the EA but in "trading" of MT4
 
WHRoeder:


Because" HistoryTotal" or "OrdersHistoryTotal" or MODE_HISTORY" are for orders no open ... after tests ... regret ...
 
scarface:

Hi,

Good day,

all you need to do is to check out what messages you have in the journal.

Post them here and then we can see what's going on.

Best wishes,

SF


Yes, perhaps my EA can read the journal as a file day after day ...

But if one knowed the name of file "trading" into MT4 ....which is always the same

 
scarface:

Hi,

Good day,

all you need to do is to check out what messages you have in the journal.

Post them here and then we can see what's going on.

Best wishes,

SF

Finally, I créated a file that records my trading and I reread it