Please help, i think this is really simple but i don´t know how to do it.
I need help modifying an EA that i have coded and adapted.I want to modify it such that, once a fractal is used as a signal to open a trade, another trade will not be opened based on the same fractal. This is to prevent the instance when, a trade is profitably closed and theprice comes back towards the fractal to head in the opposite direction.
This is the code that i have made so far. (i already had try a lot of options, a loop for for timing, TimeCurrent(), Time[variable] in loops, etc...but i am not expert in coding)
And other issue is i want to make this EA to trade in same account but just one Pair. So i can have all the graphics that i want but the EA will trade in each individual Pair. For instance, it will read in OrderTotalHistory(), find last EURUSD positive/negative trade, and send new order.
Just set new variable where will be time of bar where was fractal.
And than when you create for()
add if(Time[i]<=last_frac_time) break;
static datetime time0=0;
datetime prev = time0; time0 = Time;
bool isNewBar = time0 != prev;
double frac = iFractals(NULL,0, MODE_UPPER, 3);
if(fract != 0) // found one.
So eeviill and WHRoeder, i have tray to modified the code according your ideas, but i didn´t make any progress, for intenses, WHReoder, how i input that code in the EA?? I think my problem is about coding... :(
To add comments, please log in or register