View Single Post
  #3 (permalink)  
Old 11-18-2007, 08:04 PM
tdion's Avatar
tdion tdion is offline
Senior Member
 
Join Date: Mar 2006
Location: South Carolina, USA
Posts: 166
tdion is on a distinguished road
I noticed a problem immediately with this EA.

The "Close All" function shouldn't work properly as coded.

Reason being: MT4 will only execute one operation per tick.....

void CloseAll()
{
int total = OrdersTotal();
for(int i=total-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);

It should be more like "while(OrdersTotal()>0)" etc......

That will force the program to loop instead of moving on after one order closes.

I could be wrong, but that is based on first glance.
__________________
Ideas are not trade advice.
Reply With Quote