Random groups in strategy template : not able to use Random groups

I am using random groups, SQX is giving error message and stop to run.


This can happen on any Building blocks
Attachments
log_2022_05_02.log
(5.14 MiB)
  • Votes +11
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

E
#1

Emmanuel

02.05.2022 11:21

Task created

E
#2

Emmanuel

02.05.2022 11:21
Voted for this task.
E
#3

Emmanuel

03.05.2022 21:10

Attachment BlockGroupsExport3.xml deleted

E
#4

Emmanuel

03.05.2022 21:11

Description changed:

I am using random groups, SQX is giving error message and stop to run.


I was able to find the Building blocks creating this error in Random Groups.

It is the Equals and not equals Blocks .

I attached an example with equal blocks but the not equals blocks will not work with random groups 

Attachment Entry Long Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Entry Short Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Exit Short Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Exit Long Building Blocks File sorted by NetProfit Of P1 R.xml added

Exit Short Building Blocks File sorted by NetProfit Of P1 R.xml
(1.62 KiB)
Exit Long Building Blocks File sorted by NetProfit Of P1 R.xml
(1.37 KiB)
Entry Long Building Blocks File sorted by NetProfit Of P1 R.xml
(2.29 KiB)
Entry Short Building Blocks File sorted by NetProfit Of P1 R.xml
(135 B)
E
#5

Emmanuel

04.05.2022 20:39

Attachment log_2022_05_04.log added

Attachment All Building Blocks File.xml added

log_2022_05_04.log
(443.70 KiB)
All Building Blocks File.xml
(596.67 KiB)
I have this error : 


java.lang.NullPointerException: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.Indicator" is null


20:12:40.785 [Blocking computeThread common #29] INFO  c.s.t.project.ProgressEngine - Build strategies P4 Long : GRID: Stopping build, job failures (exceptions) exceeded 70%!

20:12:40.789 [Blocking computeThread common #48 - Builder_0-Generation 1.0.1] ERROR BacktestEvaluator - java.lang.NullPointerException: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.Indicator" is null


20:12:40.785 [Blocking computeThread common #10 - Builder_0-Generation 1.0.2] ERROR BacktestEvaluator - java.lang.NullPointerException: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.Indicator" is null

at SQ.Blocks.Comparisons.IsFalling.OnEvaluateComparison(IsFalling.java:57)


I removed all  Equals and not equals Blocks , And I still have this error 


What does it means ? How can we avoid this error ?




b
#6

bentra

05.05.2022 04:36
I can't remember all the problems I ran into trying to get groups working but eventually I did. Could it be that you have some members of your group which are not selected in the building blocks tab? Blocks (I think) need to be both selected in the building blocks tab as well as being members of the group. I'd attach the template (the template contains the group data too btw)
E
#7

Emmanuel

05.05.2022 17:40
thank you very much Bentra for your answer. 
E
#8

Emmanuel

05.05.2022 17:46

Attachment log_2022_05_05.log added

Attachment Entry Long Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Entry Short Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Exit Short Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Exit Long Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment H1201 Template P4 Exc.sqx added

Entry Long Building Blocks File sorted by NetProfit Of P3 R.xml
(33.93 KiB)
H1201 Template P4 Exc.sqx
(35.17 KiB)
Entry Short Building Blocks File sorted by NetProfit Of P3 R.xml
(181.01 KiB)
Exit Long Building Blocks File sorted by NetProfit Of P3 R.xml
(28.40 KiB)
log_2022_05_05.log
(293.76 KiB)
Exit Short Building Blocks File sorted by NetProfit Of P3 R.xml
(135.07 KiB)
I did more test , and I still have this error (below)


I attached my log, template, and random groups




17:36:50 Build strategies P4 Long : Project stopped

17:36:50 Build strategies P4 Long : GRID: Stopping build, job failures (exceptions) exceeded 70%!

17:36:50 Build strategies P4 Long : Strategy 2.0.2

   - Exception in backtest: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.IndicatorLeft" is null - in 0.01 s.

17:36:50 Build strategies P4 Long : Strategy 2.0.3

   - Exception in backtest: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.Indicator" is null - in 0.00 s.

17:36:50 Build strategies P4 Long : Strategy 2.0.4

   - Exception in backtest: Cannot invoke "com.strategyquant.tradinglib.IBlock.evaluateBlock(int)" because "this.IndicatorLeft" is null - in 0.00 s.




E
#9

Emmanuel

05.05.2022 17:51
Some Building Blocks are producing error. but how do we know which one ?


for example we have only this.IndicatorLeft  without the block  name


We need the block name. We need SQX to not stop for one null block 


 

E
#10

Emmanuel

05.05.2022 19:55


I tested block by block, I check the XML template. there is no problem inside the template, The group of block is inside it with its parameters. It should work


I did many tests , it is clearly a bug inside SXQ.


I have results to share with the community , I need this features



b
#11

bentra

05.05.2022 20:29
All of your random conditions are called from groups in this template, so why not just select ALL blocks from the building blocks tab? It looks like you have randomly chosen action as well so don't forget all the order type blocks too. 

I think the only files necessary to reproduce your issue will be the build config file and the template (and any custom indicator snips.) I see the template but did you attach the build config somewhere?
E
#12

Emmanuel

05.05.2022 21:04

Attachment Build strategies 5.cfx added

Build strategies 5.cfx
(56.41 KiB)
Thank you Bentra for your answer.


Good idea Here is the Build .


Bentra, could you explain more when you write "All of your random conditions are called from groups in this template, so why not just select ALL blocks from the building blocks tab? It looks like you have randomly chosen action as well so don't forget all the order type blocks too. "


In my build , I followed your advice and selected all blocks in the building blocks tab.  


When you write about random action, do you mean the order types/Exit type ? I selected them as well. But I still have this error.


Thank you for your help

E
#13

Emmanuel

06.05.2022 11:16

Description changed:

I am using random groups, SQX is giving error message and stop to run.


This can happen on any Building blocks

Attachment H1217 Template P4 Exc.sqx added

Attachment Entry Long Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Entry Short Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Exit Long Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment Exit Short Building Blocks File sorted by NetProfit Of P3 R.xml added

Attachment log_2022_05_06.log added

H1217 Template P4 Exc.sqx
(40.03 KiB)
Exit Short Building Blocks File sorted by NetProfit Of P3 R.xml
(135.07 KiB)
Exit Long Building Blocks File sorted by NetProfit Of P3 R.xml
(28.40 KiB)
Entry Short Building Blocks File sorted by NetProfit Of P3 R.xml
(181.01 KiB)
log_2022_05_06.log
(432.09 KiB)
Entry Long Building Blocks File sorted by NetProfit Of P3 R.xml
(33.93 KiB)
E
#14

Emmanuel

06.05.2022 12:03

Attachment log_2022_05_06 - Copie.rar added

log_2022_05_06 - Copie.rar
(93.47 KiB)
I tried as well with B136.1103, and I have as well errors
b
#15

bentra

07.05.2022 04:28
I was about to try and reproduce your issue in 136 dev1 but I don't have the custom snippets. Someone will need all the custom snippets, the template, and the build config together to exactly reproduce your situation. I did notice this conflict: The template has SL and TP turned off but you have selected SL and TP in the build config....
Cc
#16

Cyber

08.05.2022 05:10
Voted for this task.
E
#17

Emmanuel

09.05.2022 03:39
.
E
#18

Emmanuel

10.05.2022 15:33

Attachment H1220 Template P2 2000.sqx added

Attachment All Building Blocks File.xml added

Attachment Build strategies 6.cfx added

All Building Blocks File.xml
(1.82 MiB)
Build strategies 6.cfx
(70.23 KiB)
H1220 Template P2 2000.sqx
(26.27 KiB)
I have again this error, I am not able to use random groups


l
#19

Loonly

10.05.2022 16:53
Voted for this task.
Bt
#20

beetrader

10.05.2022 16:59
Voted for this task.
Fs
#21

Fortunate

10.05.2022 17:00
Voted for this task.
a
#22

astral

10.05.2022 17:32
Voted for this task.
M
#23

MM1

10.05.2022 17:50
Voted for this task.
E
#24

Emmanuel

10.05.2022 19:49

Attachment Entry Long Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Entry Short Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Exit Long Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment Exit Short Building Blocks File sorted by NetProfit Of P1 R.xml added

Attachment H1222 Template P2 2000.sqx added

Entry Long Building Blocks File sorted by NetProfit Of P1 R.xml
(7.50 KiB)
Entry Short Building Blocks File sorted by NetProfit Of P1 R.xml
(9.71 KiB)
Exit Short Building Blocks File sorted by NetProfit Of P1 R.xml
(19.17 KiB)
Exit Long Building Blocks File sorted by NetProfit Of P1 R.xml
(10.84 KiB)
H1222 Template P2 2000.sqx
(7.20 KiB)
I am not able to use these random groups as well
KB
#25

Kevin

10.05.2022 22:06
Voted for this task.
DC
#26

anuffi

11.05.2022 00:59
Voted for this task.
f
#27

FirestarZA

16.05.2022 15:55
Voted for this task.
E
#28

Emmanuel

20.05.2022 07:39
.
MF
#29

Mark Fric

20.06.2022 11:00

Status changed from New to Fixed

I found the problem, there wasn't a proper support for a type of snippet that uses sub blocks, such as IsLowerCount


Fixed in Build 136 Dev2.


Votes: +11

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please