[136] mq5 bug in templates printNestedIndicatorShift

Hi,

I am getting this error with several strategies if trying to create MQL5 code (MQL4 + the rest works fine), regardless of the indicators used (internal and external ones) from time to time. I´ve attached 2 example strategies where this happens.


An error occured while generating the strategy XML source code. Exc. Can't try to resolve the XML query key, because no XPath support is available. This is either malformed or an XPath expression: @indicatorName ---- FTL stack trace ("~" means nesting-related): - Failed at: #if param.@key[0]?? && !ret && (child... [in template "MetaTrader5/mt5Blocks.inc" in macro "printNestedIndicatorShift" at line 576, column 9] - Reached through: @printNestedIndicatorShift block [in template "MetaTrader5/blocks/IsFalling.tpl" at line 1, column 134] - Reached through: #include "blocks/" + key + ".tpl" [in template "MetaTrader5/mt5Blocks.inc" in macro "printBlock" at line 478, column 27] - Reached through: @printBlock signal?children[0] [in template "MetaTrader5/mt5Blocks.inc" in macro "printRule" at line 385, column 97] - Reached through: @printRule rule, eventName [in template "MetaTrader5/mt5Blocks.inc" in macro "printRulesForEvent" at line 299, column 1] - Reached through: @printRulesForEvent "OnBarUpdate" [in template "MetaTrader5\\Main.tpl" at line 229, column 1] (Hidden 6 "~" lines for terseness) ----



Attachments
Strategy 0342246.sqx
(254.63 KiB)
  • Votes +5
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

g
#1

geektrader

06.01.2023 02:34

Task created

g
#2

geektrader

06.01.2023 02:34

Subject changed from [137] "Can't try to resolve the XML query key, because no XPath support is available." to [136] "Can't try to resolve the XML query key, because no XPath support is available."

g
#3

geektrader

06.01.2023 02:34
Voted for this task.
g
#4

geektrader

06.01.2023 02:40

Description changed:

Hi,

I am getting this error with several strategies if trying to create MQL5 code (MQL4 + the rest works fine), regardless of the indicators used (internal and external ones) from time to time. I´ve attached 2 example strategies where this happens.


An error occured while generating the strategy XML source code. Exc. Can't try to resolve the XML query key, because no XPath support is available. This is either malformed or an XPath expression: @indicatorName ---- FTL stack trace ("~" means nesting-related): - Failed at: #if param.@key[0]?? && !ret && (child... [in template "MetaTrader5/mt5Blocks.inc" in macro "printNestedIndicatorShift" at line 576, column 9] - Reached through: @printNestedIndicatorShift block [in template "MetaTrader5/blocks/IsFalling.tpl" at line 1, column 134] - Reached through: #include "blocks/" + key + ".tpl" [in template "MetaTrader5/mt5Blocks.inc" in macro "printBlock" at line 478, column 27] - Reached through: @printBlock signal?children[0] [in template "MetaTrader5/mt5Blocks.inc" in macro "printRule" at line 385, column 97] - Reached through: @printRule rule, eventName [in template "MetaTrader5/mt5Blocks.inc" in macro "printRulesForEvent" at line 299, column 1] - Reached through: @printRulesForEvent "OnBarUpdate" [in template "MetaTrader5\\Main.tpl" at line 229, column 1] (Hidden 6 "~" lines for terseness) ----



Attachment Strategy 0263710.sqx added

Strategy 0263710.sqx
(283.49 KiB)
g
#5

geektrader

06.01.2023 02:44

Attachment Strategy 05809.sqx added

Strategy 05809.sqx
(335.50 KiB)
Added one more strategy where this happens - should hopefully be enough examples.
g
#6

geektrader

06.01.2023 03:32

Attachment Strategy 0112582.sqx added

Strategy 0112582.sqx
(318.56 KiB)
And one more strategy where this happens that only uses standard indicators.
b
#7

bentra

06.01.2023 03:57
Voted for this task.
CG
#8

Chris G

06.01.2023 16:23
Voted for this task.
?
#9

anonymous

09.01.2023 16:30

Subject changed from [136] "Can't try to resolve the XML query key, because no XPath support is available." to [136] mq5 bug in templates printNestedIndicatorShift

Attachment image-0.png added

image-0.png
(178.09 KiB)
problem with printNestedIndicatorShift
E
#10

Emmanuel

15.01.2023 10:09
Voted for this task.
k
#11

Karish

16.01.2023 13:11
Voted for this task.
g
#12

Lee Guan Chuan

19.01.2023 06:36

Status changed from New to Waiting for information

Hi, geektrader,


I don't know whether I tested this correctly. 


I have imported the given strategies into SQX in development and SQX 136.1446 and can export them correctly. Am I doing something incorrectly?


Thank you.

g
#13

geektrader

19.01.2023 08:41

Hi Lee,


upon reloading into Retester, it seems to be able to be exported fine. However, when generated in the Builder and trying to export it from there, this error comes up.


Thank you.

g
#14

Lee Guan Chuan

20.01.2023 06:28

Status changed from Waiting for information to Fixed

g
#15

Lee Guan Chuan

20.01.2023 06:29
Hi geektrader,


I have updated the code and tested it on my machine, and it works correctly now. Please update us if this issue persists in your machine in the coming version. 


Thank you.

g
#16

geektrader

20.01.2023 07:25

Hi Lee,


thank you, I will report back it if keeps on happening.


Cheers :-)


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