- ago
Glitch - in another thread you mentioned you were going to release a patch for DrawBarAnnotation not working. DrawText may not be working, either.

Here's my stack trace:

CODE:
System.FormatException: String 'NULL' was not recognized as a valid Boolean. at System.Boolean.Parse(ReadOnlySpan`1 value) at System.Boolean.Parse(String value) at RepositoryCandidate.StopWorker(String , RepositoryCandidate ) at WealthLab.Core.Tokenizer.get_TokenBoolean() at IdentifierField.VerifyGenericInterpreter(Object , IdentifierField ) at WealthLab.ChartWPF.StrategyPlotFactory.RegisterStrategyPlot(ChartPane pane, String mdo) at WealthLab.ChartWPF.CoreChart.set_StrategyDrawnObjects(Dictionary`2 value) at WealthLab.ChartWPF.CoreChart.SetupStrategyItems(StrategyBase sb, BarHistory bars, Backtester bt) at AlgoBroadcaster.PopRequest(Object , StrategyBase , BarHistory , Backtester , AlgoBroadcaster ) at WealthLab8.cwStrategy.PostObserver(BarHistory value, StrategyBase second) at WealthLab8.cwStrategy.InsertObserver(Object init, EventArgs map) at System.Windows.Threading.DispatcherTimer.FireTick() at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


I'm calling DrawText as follows...

CODE:
DrawText("TC", idx, bars.Close[idx], WLColor.Aqua, 8);


Problem occurs in WL8, build 11.
0
191
Solved
6 Answers

Reply

Bookmark

Sort
Cone7
- ago
#1
I'm not seeing a problem with that statement. What statement is executed just before that one?

In any case, make sure that you're using Build 11B as described here -
https://www.wealth-lab.com/Discussion/8287
0
Cone7
- ago
#2
I take it back. I do see a problem with that statement, even with 11B. Looking into it!
0
- ago
#3
Yes, confirmed this and fixed it for Build 12. Will try to get this out as soon as possible.
0
Best Answer
- ago
#4
I uninstalled 11 and installed 11B. I ran my strategy, and it fixed the problem for DrawBarAnnotation (that too did not work for me in build 11).

But, as you noted, DrawText still has a problem. If I un-comment DrawText, then I get an exception. If I comment-out DrawText, the strategy runs fine. The strategy is not doing anything special prior to calling DrawText, just some very basic logic related to the strategy, and not any calls to WL libraries except for run-of-the-mill TimeSeries referencing.
0
- ago
#5
I loaded build 12.
DrawHeaderText appears to work with paneTag == "Price" or "" but null fails at run time with exception value can't be null.

CODE:
DrawHeaderText("Test", WLColor.Green, 12, null);


Some of my code is with the pane, and some without.
I could use reflection, but hate doing this.
Is it possible to discard null paneTag or when drawing to instances without a pane as was the case before build 10?
1
- ago
#6
Yes, good point, we can work on ignoring a pane tag with a null parameter value.
1

Reply

Bookmark

Sort