Startegy Tester not working properly

 

Helou I realy need good advice. I put my EA into Startegy tester, I know that chart objects are not created in Tester, only in visualization mode. So a tried it. I create FIBO object based on two MA. But the visualization creates

only the second one from ELSE, do I use the if-else operator not correctly?? Or do you see any problem in the code??? thanks a lot

if (maFast[0]<maSlow[0]) 
    {
      if(!ObjectCreate(0,name1,OBJ_FIBO,0,HighestTime,highest,LowestTime,lowest))
      {
      Print(__FUNCTION__,": failed to create \"Fibonacci Retracement\"! Error code = ",GetLastError());
      return;
      }
      ResetLastError();
      ChartRedraw(0);
      //--- set color K JEDNOTLIVÝM LEVELŮM
      ObjectSetInteger(0,name1,OBJPROP_COLOR,clrRed);
      ObjectSetInteger(0,name1,OBJPROP_LEVELS,5);
      ObjectSetInteger(0,name1,OBJPROP_LEVELCOLOR,0,clrBlue);
      ObjectSetInteger(0,name1,OBJPROP_LEVELCOLOR,1,clrBlue);
      ObjectSetInteger(0,name1,OBJPROP_LEVELCOLOR,2,clrBlue);
      ObjectSetInteger(0,name1,OBJPROP_LEVELCOLOR,3,clrBlue);
      ObjectSetInteger(0,name1,OBJPROP_LEVELCOLOR,4,clrBlue);
      ObjectSetInteger(0,name1,OBJPROP_RAY_RIGHT,true);
      ChartRedraw(0);
   }
      //---------------- Fibonaciho retracement MIRO --------------
   else // if(maFast[0]>maSlow[0])
   {
      if(!ObjectCreate(0,name,OBJ_FIBO,0,LowestTime,lowest,HighestTime,highest))
      {
      Print(__FUNCTION__,": failed to create \"Fibonacci Retracement Miro\"! Error code = ",GetLastError());
      return;
      }
      ResetLastError();
      ChartRedraw(0); 
      //--- set color K JEDNOTLIVÝM LEVELŮM
      ObjectSetInteger(0,name,OBJPROP_COLOR,clrRed);
      ObjectSetInteger(0,name,OBJPROP_LEVELS,5);
      ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,0,clrBlack);
      ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,1,clrBlack);
      ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,2,clrBlack);
      ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,3,clrBlack);
      ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,4,clrBlack);
      ObjectSetInteger(0,name,OBJPROP_RAY_RIGHT,true);
      ChartRedraw(0);
      Print("Else");
   }
 
vanuatu:

Helou I realy need good advice. I put my EA into Startegy tester, I know that chart objects are not created in Tester, only in visualization mode. So a tried it. I create FIBO object based on two MA. But the visualization creates

only the second one from ELSE, do I use the if-else operator not correctly?? Or do you see any problem in the code??? thanks a lot

So that means your condition is false. Check maFast[0] and maSlow[0] if you have any doubt about that.
Reason: