Strategy tester Message

 

Can anyone tell me what this means from my tester log ?

20:57:16 2010.06.02 00:09 test3 EURUSD,M1: open #1 buy 1.00 EURUSD at 1.2233 sl: 1.2216 ok

20:57:16 2010.06.02 00:09 test3 EURUSD,M1: zero divide

20:57:16 2010.06.02 00:25 Tester: stop loss #1 at 1.2216 (1.2216 / 1.2218)

it appears it is saying there is something wrong with my stop loss but I dont know what exactly.

this is my ordersend code, StopLoss is a global variable at 15.0

       if (Typ==0)
         {
         SL=Bid-StopLoss* Point;
         Ticket=OrderSend(Symbol(),0,Lots,Ask,0,SL,0,"",MN,0,clr);
         }
      if (Typ==1)
         {
         SL=Ask+StopLoss* Point;
         Ticket=OrderSend(Symbol(),1,Lots,Bid,0,SL,0,"",MN,0,clr);
         }
 
SDC:

20:57:16 2010.06.02 00:09 test3 EURUSD,M1: zero divide


Where is the division occuring in your code? zero divide means somewhere you have a division occuring which is resulting in a divide by zero:

int A=10;
int B=0;

int C=A/B;   // will result in error of "zero divide"
 
SDC:

Can anyone tell me what this means from my tester log ?

20:57:16 2010.06.02 00:09 test3 EURUSD,M1: open #1 buy 1.00 EURUSD at 1.2233 sl: 1.2216 ok

20:57:16 2010.06.02 00:09 test3 EURUSD,M1: zero divide

20:57:16 2010.06.02 00:25 Tester: stop loss #1 at 1.2216 (1.2216 / 1.2218)

it appears it is saying there is something wrong with my stop loss but I dont know what exactly.

this is my ordersend code, StopLoss is a global variable at 15.0


OrderSend(Symbol(),OP_BUY,LotSize,Ask,3,Ask-StopLoss*Poin,Ask+TargetProfit*Poin,
"My EA",12345,0,Green);

OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+StopLoss*Poin,Bid-TargetProfit*Poin,
"My EA",12345,0,Red);

 

hmmm well I think i found it, I have a calculation that used an array value to create the magic number but now you mentioned it I realised before the first order is open that array value is still at zero so it must be causing a divide by zero on the first ordersend .. thanks Phillip

Reason: