Ea Wizard started generating different code from around the 23-November-2018

I've done a full reinstall of EA wizard and ran all updates but to no avail.



I've bolded the changes and important information below.


--Old code


int sqGetBarsSinceEntry(int orderMagicNumber) {

   for (int cc = OrdersTotal() - 1; cc >= 0; cc--) {

      if (OrderSelect(cc, SELECT_BY_POS) ) {


         if((orderMagicNumber == 0 || OrderMagicNumber() == orderMagicNumber) && OrderSymbol() == Symbol()) {

            return (sqGetBarsFromOrderOpen(1000));

         }

      }

   }


   return(-1);

}



int sqGetBarsSinceExit(int orderMagicNumber) {


   for(int i=OrdersHistoryTotal(); i>=0; i--) {

      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==true) {


         if(OrderMagicNumber() == orderMagicNumber && OrderSymbol() == Symbol()) {

            return (sqGetBarsFromOrderClose(1000));

         }

      }

   }


   return(-1);

}


double sqGetRecent(int avgIndiNumber, int period, int signalShiftLocal) {


   double indicatorValue;


   for(int i=0; i<period; i++) {

      if(avgIndiNumber == 1110459352) {

         indicatorValue = iVolume(NULL, 0 , 1 +i);

         if(indicatorValue != EMPTY_VALUE && indicatorValue != 0) {

            return(indicatorValue);

         }

      }

   }


   return(0);

}




--New code (causing hanging behavior if magicnumbers are very large plus this is incorrect)


int sqGetBarsSinceEntry(int orderMagicNumber) {
   for (int cc = OrdersTotal() - 1; cc >= 0; cc--) {
      if (OrderSelect(cc, SELECT_BY_POS) ) {


         if((orderMagicNumber == 0 || OrderMagicNumber() == orderMagicNumber) && OrderSymbol() == Symbol()) {
            return (sqGetBarsFromOrderOpen(orderMagicNumber));
         }
      }
   }


   return(-1);
}






int sqGetBarsSinceExit(int orderMagicNumber) {


   for(int i=OrdersHistoryTotal(); i>=0; i--) {
      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==true) {


         if(OrderMagicNumber() == orderMagicNumber && OrderSymbol() == Symbol()) {
            return (sqGetBarsFromOrderClose(orderMagicNumber));
         }
      }
   }


   return(-1);
}




// This piece of code has changed and is throwing this error "variable 'indicatorValue' not used"


double sqGetRecent(int avgIndiNumber, int period, int signalShiftLocal) {


   double indicatorValue;


   for(int i=0; i<period; i++) {
   }


   return(0);
}

My concern too if other generated code has changed and we not aware of this?


Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

SG
#1

gres0124

22.01.2019 07:03

Task created

TB
#2

Tomas Brynda

28.01.2019 14:33

Status changed from New to Refused

This is probably an issue of old EA Wizard. We don't use this code in a new version of AlgoWizard or SQ
SG
#3

gres0124

29.01.2019 06:14
Why is the old wizard unsupported now if the new wizard hasn't been released as yet?

Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please