where is order data stored...

[Deleted]  

I'm working on an EA that functioned until this afternoon. Where is the data regarding an open order stored?


The open order count is correct at '6', and I receive the 'Here...' alert 6 times for each cycle. I do not get into the code after the 'if'.


In thinking back, the only think I can think of is that I cleaned out the accumulated log files. Did I do it to myself?


This running on a demo account at FastFX.


Thanks for your input.


for (int cnt1=1; cnt1<=OrdersTotal(); cnt1++) //Cycle for all orders..
{

Alert("Here...");
if(OrderSelect(cnt1-1,SELECT_BY_POS)==true && OrderSymbol()==Symbol())
{

Alert(Symbol()+"...at profit point..."+cnt1);



}

}

[Deleted]  

The open orders are held on the broker's server.

I'd recommend you loop down through the orders, rather than up.

 
dj9866:

I'm working on an EA that functioned until this afternoon. Where is the data regarding an open order stored?

The open order count is correct at '6', and I receive the 'Here...' alert 6 times for each cycle. I do not get into the code after the 'if'.

In thinking back, the only think I can think of is that I cleaned out the accumulated log files. Did I do it to myself?

Cloudbreaker's right on both counts in his reply. Two other things worth mentioning, albeit about closed rather than open orders:


  • MT4 can sometimes start up with filtering automatically in place on the account history. Don't know if it's the broker or the software which controls this. You need to right-click and choose "All History" to get the full list, and the filtering affects what EAs see via OrdersHistoryTotal() etc as well as what's displayed on screen.
  • Some brokers truncate the history on demo accounts such that "All History" never goes back beyond a certain point.

[Deleted]  
jjc:

Cloudbreaker's right on both counts in his reply. Two other things worth mentioning, albeit about closed rather than open orders:


  • MT4 can sometimes start up with filtering automatically in place on the account history. Don't know if it's the broker or the software which controls this. You need to right-click and choose "All History" to get the full list, and the filtering affects what EAs see via OrdersHistoryTotal() etc as well as what's displayed on screen.
  • Some brokers truncate the history on demo accounts such that "All History" never goes back beyond a certain point.
Cloudbreaker and jjc...thank you for your responses...