PseudoCode Error

With StockPicker, it sometimes generates a pseudocode error, in RC3.  I used random entry type & exit type.
An error occured while generating the strategy XML source code.
Exc. For "?contains" left-hand operand: Expected a string or something automatically convertible to string (number, date or boolean), but this has evaluated to a sequence+hash (wrapper: f.e.dom.NodeListModel):
==> doc.StrategyFile.Strategy.@singleAsset  [in template "PseudoCode/pseudoBlocks.inc" at line 117, column 43]

----
Tip: This XML query result can't be used as string because for that it had to contain exactly 1 XML node, but it contains 0 nodes. That is, the constructing XML query has found no matches.
----
Tip: For sequences/collections (lists and such) use "?seq_contains" instead.
----

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #elseif rule.@type == "StockpickerPS"...  [in template "PseudoCode/pseudoBlocks.inc" in macro "printRule" at line 117, column 1]
    ~ Reached through: #nested  [in template "PseudoCode/Functions.inc" in macro "replaceBr" at line 4, column 18]
    ~ Reached through: @replaceBr  [in template "PseudoCode/pseudoBlocks.inc" in macro "printRule" at line 16, column 1]
    - Reached through: @printRule rule, ruleName  [in template "PseudoCode/pseudoBlocks.inc" in macro "printRulesForEvent" at line 7, column 33]
    - Reached through: @printRulesForEvent "OnBarUpdate", "T...  [in template "PseudoCode\\Main.tpl" at line 49, column 1]
----
Attachments
Strategy 035.sqx
(88.21 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

BT
#1

EndUser

17.05.2023 23:16

Task created

E
#2

Emmanuel

18.05.2023 15:29
Voted for this task.
TT
#3

Tamas

22.05.2023 22:23

Status changed from New to Fixed

Thanks for reporting the bug. I was able to reproduce it and fix it.

Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please