- ago
Downloaded Build 4 and now most of strategies witch were created in WL7
dont work.
This is the message i get:
Error during Backtest: Opject reference not set to an instance of an ojekt

The same message if i want to create a new strategie
0
1,428
Solved
14 Replies

Reply

Bookmark

Sort
- ago
#1
We decided to move some advanced indicators to the PowerPack (and one went to WealthLab.Community - to be released soon) so they disappeared from Build 4.

https://www.wealth-lab.com/extension/detail/PowerPack

If installing this extension doesn't fix it you might want to provide more insight for us to have a detailed problem description. Were these strategies created in Blocks? What indicators or conditions they use? etc.
0
- ago
#2
i opened the strategie in code and this is what i found

CODE:
public override void Initialize(BarHistory bars) {       indicator = new StochK(bars,9);       Plot(indicator,Color.FromArgb(255,0,0,0));


"Plot" does not exist in context

So if i delte "Plot(indicator,Color.FromArgb(255,0,0,0));"
everything works.
0
- ago
#3
Indeed, Plot was removed but is left in Blocks :(

According to the change log:
https://www.wealth-lab.com/Software/ChangeLog

Removed deprecated Plot method, use the methods like PlotIndicator, PlotBarHistory, and PlotTimeSeries instead.

You'll have to reconstruct Strategies based on Blocks for build 4. If you need to plot the series in your code, just change it to PlotIndicator or PlotTimeSeries:

CODE:
...indicator = new StochK(bars,9); PlotIndicator(indicator,Color.FromArgb(255,0,0,0));


Sorry for the trouble.
0
- ago
#4
ok,
but if i build a new block strategie it is the same problem.
so, do i always have to open in C and change plot to plotseries?
0
- ago
#7
Thank you for the bug report. Team needs to decide on how to fix it. For now, this is the workaround.
0
- ago
#8
I changed the plot (indicator, ......)to PlotIndicator all. Is compile.


Just how do I change plot (weight, .....)

Plot(weight,Color.FromArgb(255,255,0,0));

Thanks.
0
- ago
#9
At the moment I don't see a workaround for Plot(weight).

Workaround: in the Transaction Weight rule, check "Disable" and then uncheck it prior to clicking "Open as C# coded strategy".
0
- ago
#10
I guess you should rewrite some of the built-in strategies too? Because Alligator System doesn’t work now as well. Newcomers will be surprised if they find built-in strategies not working).
0
- ago
#11
We are aware of the bugs with Blocks and Plot() and will fix them at the earliest possible convenience.
0
- ago
#12
Hans60,
QUOTE:
how do I change plot (weight, .....)

Workaround:
1. in the Transaction Weight rule, check "Disable" and then uncheck it
2. click "Open as C# coded strategy"
3. Change Plot(weight... to PlotIndicator(weight...
1
- ago
#13
It worked.

Do not deactivate the "Deactivate" option for the "Transaction weight".
Otherwise the coding will not be displayed in "Open as C".

Thank you very much.
1
- ago
#14
Build 5 fixes both issues with Blocks (Plot() / Transaction block):

https://www.wealth-lab.com/Software/ChangeLog
0
Best Answer

Reply

Bookmark

Sort