- ago
In the past I passed an instance of UserStrategyBase (usb.) into my DLL libraries to access DrawText and DrawHeaderText. Now the VS Object Browser is telling me these methods belong to WealthLab.Backtest instead. Is this really true? If I'm including a "using WealthLab.Backtest" statement in my DLL libraries, does that mean I can call DrawText and DrawHeaderText without prefixes now? (There's nothing about this in the release notes.) Or should I be using a different kind of prefix for these methods now?

CODE:
public void ShowCornerMsg(string cornerMsg, TimeSeries ts2frame, string messagePane, double hue = 0.5, int fontSize = 11) { ... WLFont cornerFont = new WLFont("Arial", fontSize, isBold: true); usb.DrawText(cornerMsg, ts2frame.Count-17, yPosition, msgColor, fontSize, messagePane, false, cornerFont); }
When making breaking changes like this that require modifications of code libraries, it would be nice if WleathLab's "minor version" is incremented (8.0.10 -> 8.1.0) so we know libraries will be breaking and need recompilation.
0
768
Solved
7 Replies

Reply

Bookmark

Sort
- ago
#1
Hmm. So now do I have to pass an instance of both UserStrategyBase and StrategyBase to get my libraries to work right? Why is this getting unnecessarily more complicated? What's the goal here with all these separate instance references? Why can't they all share the same base class, say ... "StrategyInstance." ?
0
- ago
#2
This is not true. Optional parameter (bool behindBars = false) is added, though.
0
- ago
#3
So how do I get DrawText and DrawHeaderText to work now? The error message I get says there's no such method. And the Object Browser doesn't find such a method in UserStrategyBase at all.



I can email you the library code if you need it. But I don't know how to get it working in Build 12.. But it works fine in Build 10.
0
- ago
#4
Method signatures have changed, you should recompile your library.

UserStrategyBase is derived from StrategyBase, no "breaking changes" here.
1
Best Answer
- ago
#5
QUOTE:
UserStrategyBase is derived from StrategyBase, no "breaking changes" ...

Apparently I was assuming the worst. Thanks for the help and keeping WL no more complicated than necessary.
1
- ago
#6
With this change in order for re-compile to work properly I had to deep clean all my projects in my solution. Clean would not work. I had to delete bin and obj directories for each project, the rebuild all.
0
Glitch8
 ( 10.62% )
- ago
#7
Thanks for sharing your experience, psimmons. We try to avoid these kinds of changes, but since this one was heavily supported, we needed to add the new optional parameter and thus require a rebuild of coded strategies.
1

Reply

Bookmark

Sort