I have a problem about my EA please help me

 
I am working on a EA and I want that if my EA does double mistakes, stop for a time. what can ı doing about this.
 
Read the Trade history and when you find the last 2 trades placed by the EA are losing trades stop for a while . .
 
How do you manager your error as of now, are you using any of the functions??? What do you mean stop for a while???
 
yelo:
What do you mean stop for a while???
Don't place any trades during the next x minutes.
 
for example if my system lose the last 2 trades, it doesn't work after12 hours. later it again start the trade dou you understand ??
 
raptorUK understood me so can ı something for it. is there any code about this. ı dont know enough
 
mktw:
raptorUK understood me so can ı something for it. is there any code about this. ı dont know enough


You can begin to write down the code for calculating the total profit closed trades of your EA for one symbol one magicnumber

Is that possible for you ??

 

ı think ı cant do this. but ı solve this problem a different way thank you for your helps.
bu t ı have a different problem now. in the EA there were some codes:

double Buy1_1 = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, Current + 0);

double Buy1_2 = 36;

double Buy2_1 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_MAIN, Current + 0);

double Buy2_2 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_SIGNAL, Current + 0);

double Buy3_1 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_MAIN, Current + 2);

double Buy3_2 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_SIGNAL, Current + 2);

double Buy4_1 = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, Current + 0);

double Buy4_2 = 24;

and ı changed them like this:

extern int x = 12;

double Buy1_1 = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, Current + 0);

double Buy1_2 = x*3;

double Buy2_1 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_MAIN, Current + 0);

double Buy2_2 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_SIGNAL, Current + 0);

double Buy3_1 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_MAIN, Current + 2);

double Buy3_2 = iStochastic(NULL, 0, 26, 12, 9, MODE_EMA, 0, MODE_SIGNAL, Current + 2);

double Buy4_1 = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, Current + 0);

double Buy4_2 = x*2;

and the EA's statistics changed.

but they are same think. ı didnt understand why

 
mktw:

and the EA's statistics changed.

but they are same think. ı didnt understand why

Please use this to post code . . . it makes it easier to read.

Did the Spread change ?

Reason: