how close when the benefice equal 100 usd ?

 

I have designed an EA and I would like every time my current win reaches 100 usd all positions are closed automatically

HOW TO DO THIS ?

 

Okay.

if(AccountProfit()>100) 
 {
 // Close orders...
 }
 
Marco vd Heijden:

Okay.

Okay I'm not talking about my capital but gains in progress
 
You get the idea.
 
cool thanks !
 

if i want to cut at -100 usd it's the same?


if(AccountProfit()<-100) 
 {
 // Close orders...
 }
 
Yes.
 
Marco vd Heijden:
Yes.
if(AccountProfit()<-100) 
 {
 // Close orders...
 }
 
thanks
Reason: