what time frame?
I am testing the Fuzzy logic EA and for the two first week it made good profits. But when I looked closely at the way it was behaving, my fear became reality this week with a HUGE loosing position of -1000. What happens is that whenever the market goes against the position taken, the EA doesn't have a S/L. That means it lets the market ride with it and you could get in big trouble. Then and if the market reverse and become profitable, then the EA puts a S/L order the same as the entry price, that's why you have so much trades at 0. If the market goes more in the money then a trailing stop loss is trigger at 35 pips. For the past two days EURUSD has been going up, against the sell position taken two days ago by the EA. There is no S/L and i'm now at a projected loss of -1000. How come there is no S/L when into a loosing position ??
Hello Bass,I interest your idea. After I test your EA, I found some problem.1) Your fuzzy EA open only SELL order. I found the return value of FuzzyLogic() function alway below 0.5. Then, I look into FuzzyLogic and found wrongvalue and code 1.1) Size of Array variable in FuzzyLogic function are wrong. 1.2) I think values of Array arGator are wrong number, The SumGator variable is too small (below 0.01) 1.3) The double loop before finish the function has wrong code.
for (x=0;x<5;x++) /* all element from 0 to 4 */
for (y=0;y<5;y++) /* all element from 0 to 4 */
Summary[x] = Summary[x] + Rang[y,x]*Weight[y]; /* index of Weight */
for (x=0,Decision=0;x<5;x++) /* initialize Decision */
Decision = Decision + Summary[x]*(0.2*(x+1)-0.1);
2) In testing it generate many error order codes. I found your EA code send Order to server more than one in single tick. In start() function After it call CheckForOpen() function that send OrderSend() to server,SetStopLoss() function is called and it send OrderModify() to server and thenit send OrderModify() in start() function again before finish. It send 3 orderto server in single tick!!!
return; /* finish OrderSend */
if (SetStopLoss()) /* return the tic */
FirstSL = False;
return; /* finish 1st OrderModify */
It alway zero. I change to
Ea is not setting any stoploss because of line in function SetStopLoss():
It should be
StopLoss=NormalizeDouble(SL*Point,Digits);to setup stoploss proper way