Coding reqest...

 
 

make it as a function

if(your close condition)closeall();

//-------------- after the } of start()

void closeall()

{

nt total = OrdersTotal();

for(int i=total-1;i>=0;i--)

{

OrderSelect(i, SELECT_BY_POS);

int type = OrderType();

.

.

.

.

.

}

 
phoenix:
make it as a function

if(your close condition)closeall();

//-------------- after the } of start()

void closeall()

{

nt total = OrdersTotal();

for(int i=total-1;i>=0;i--)

{

OrderSelect(i, SELECT_BY_POS);

int type = OrderType();

.

.

.

.

.

}

ok I 'almost' understand that....I spent all day yesterday reading codersguru's lessons http://www.lightpatch.com/forex/mt_yahoo/MQL4_Tutorial/ and I'm up to lesson 11 but that doesn't mean I really grasp how to do this yet. It means that when someone speaks to me in this foreign language (mql4) I almost understand what they are saying, it doesnt' mean that I can speak it yet (code)

Reason: