Help with small EA code.

 

Hello, can anyone help me finish this EA. I know I'm doing something wrong or a piece of code could be missing. The EA should close all open orders once the account profit reaches x amount.

Thanks.

Files:
 

Hi. you shouldnt create EA to do this sort of job. instead you should use a script. i modified your code as a script. put it into ...\experts\scripts\ directory, after u download it.

Files:
 
Monserrat:

Hello, can anyone help me finish this EA. I know I'm doing something wrong or a piece of code could be missing. The EA should close all open orders once the account profit reaches x amount.

Thanks.

Hey thanks andrewk1983. I'll try it tonight. :-)

M

Reason: