Simple SelectOrder() Question

 

I have a small script that I created. When I drag it to a chart, it only sees via SelectOrder() the trades for that specific chart.


Is there a way to select all orders regardless of the chart and pair globally?


I am just using a for loop to get all orders:

for (int i=0; i<=OrdersTotal(); i++){
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
//do something with each selected order

}
 

OrderSelect() operates on a pool of trades, it does not know anything about charts.

You code above is not "chart specific".

 
phy:

OrderSelect() operates on a pool of trades, it does not know anything about charts.

You code above is not "chart specific".

Yup, I just realized that. I had issues inside my loop that was causing the problem. Thanks for the help.

Reason: