Cannot Walk Forward Optimize strategy with boolean variables

When I try to load a strategy with boolean variables, and try to start the WFO in Build 106, it gives the "You cannot set double value for variable of type boolean" error, even if all the boolean variables are unchecked in the Parameters grid.
Attachments
SQX Bug.png
(146.16 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

d
#1

Drooley

14.07.2018 13:14

Task created

MF
#2

Mark Fric

23.07.2018 13:20

Status changed from New to Waiting for information

it is strange, but I have no problems optimizing strategies with boolean variables. Can you attach your strategy here as well as Optimizer config file?
d
#3

Drooley

24.07.2018 03:37

Attachment EMAwithPSARM5V4.sq4 added

Attachment WFM Config.xml added

Hi,


Here are the requested files. I have tried other .sq4 that I made, and I realize that for this strategy in particular, for some reason, the Booleans used for Signals end up as parameters in the WFM, but not for the other strategies.


Since I'm here, I would like to add three other little bugs in the code generation for MT4 in the EA Wizard that cause compile errors and mismatched trade closing:


1) the DrawDownArrow and the DrawUpArrow cause a compile error, since the line added, sqDrawDownArrow(1), is missing the ";" at the end

2) the ConvertToPips function creates a few instances of code like this:


sqSetGlobalVariable(_ticket, "TrailingStop", sqStringHash("sqConvertToRealPips(OrderSymbol(), sqConvertToPips("Current", (TSCoef * sqATR(NULL,0, ATRPeriod, 1))))"));


Please note the double quotes around Current. Since we're already in a string, this causes a compile error, I have to manually modify these lines to replace double quotes with single quotes


3) the sqManageOrder function seems to be missing a condition, the line:


if(OrderMagicNumber() != magicNumber) {


should be:


            if((OrderMagicNumber() != magicNumber) || (OrderSymbol() != Symbol())) {


, otherwise, when running the EA on multiple pairs in the same MT4 instance, open positions from pair one get closed when opening position on pair two. And maybe it would be a good idea to add a condition comparing the comment of the open trade, like it was in SQ3. This way there would be even less chance of one EA instance closing trades made by another EA instance.


Thank you very much for the support!

Mirc

MF
#4

Mark Fric

25.07.2018 15:12

Status changed from Waiting for information to Fixed

fixed, including additinioanl reported bugs 1. and 2.


As for 3) this is intentional - your EA can place orders with multiple symbols. You should use unique Magic Number in every EA.

d
#5

Drooley

26.07.2018 11:27

Great!! Thank you very much!


Ok for 3), got it!


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