Adding a new Parameter to any snippet breaks the snippet in all prior workflows

Lets say I have a money management snippet. (Can also be a monte carlo snippet, whatif, etc)

I have a workflow that is using that money management snippet. I decide I need an additional parameter in the snippet. So I add it (I added a buy and sell multiplier).

If I run the original workflow with the updated money management, that new parameter is run with NaN or null. Instead of the default parameter value.



I have quick fixed this before, using the - + on the parameter for each existing workflow to populate the snippet with the default value. But, something underlying isn't working as this shouldn't need to be done.
i.e it displays correctly the default value ("1" in my case). But, underlying when the code is run, it must execute as NaN or null. Which causes no trades on all my strategies.

Attachments
AllStrategiesNoTrades1.png
(39.92 KiB)
MMsnippet.png
(36.53 KiB)
AllStrategiesNoTrades.png
(19.04 KiB)
AllStrategiesNoTrades2.png
(206.30 KiB)
MMNewParameters.png
(20.91 KiB)
  • Votes +5
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

KB
#1

kbtech

03.07.2022 22:09

Task created

KB
#2

kbtech

03.07.2022 22:09
Voted for this task.
KB
#3

kbtech

03.07.2022 22:40

Attachment ParameterBug Fixed with -.cfx added

Attachment ParameterBug.cfx added

Attachment FdebugValueBug.png added

Attachment FdebugValueFix.png added

Attachment FixedSizeClone.png added

Attachment MMSnippet_FixedSizeClone.png added

Attachment SQExtension_FixedSizeClone.sxp added

SQExtension_FixedSizeClone.sxp
(1.38 KiB)
FdebugValueBug.png
(286.71 KiB)
ParameterBug.cfx
(37.23 KiB)
FdebugValueFix.png
(186.25 KiB)
MMSnippet_FixedSizeClone.png
(71.94 KiB)
ParameterBug Fixed with -.cfx
(37.27 KiB)
FixedSizeClone.png
(58.46 KiB)
I know debug team wants a project to go with the bug. I built a quick project for this purpose. 


ParameterBug.cfx is the project with a cloned "FixedSize". Ran it once. Then restarted sqx. Added the new Multiplier parameter with default value of 1. Then restarted sqx. Ran the project and the backtest is broken.

ParameterBugFixed.cfx I used the -+ beside the multiplier to "update" the parameter with the default value. Which then the backtest works again.

I found out it doesn't give a Nan value. Just gives a double value of 0.0.

k
#4

Karish

04.07.2022 10:50
Voted for this task.
E
#5

Emmanuel

06.08.2022 15:37
Voted for this task.
CG
#6

Chris G

24.09.2022 17:00
Voted for this task.
HH
#7

Hans

21.10.2022 00:58
Voted for this task.
TT
#8

Tamas

11.11.2022 14:35

Status changed from New to In progress

TT
#9

Tamas

11.11.2022 15:56

Status changed from In progress to Fixed

I have found the bug and fixed it.

Votes: +5

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please