Glitch8
 ( 9.89% )
- ago
With the release of WL8 imminent, here's a blog post the gives some tips on how to migrate from WL7 to WL8.

https://www.wealth-lab.com/blog/Migrating
0
686
13 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
System.Drawing.Color has been replaced with a new WLColor class, which has largely the same interface. And System.Drawing.Font has been replaced with a WLFont class, which contains a few properties that describe the font in a cross platform way. The WL7 -> WL8 translator automatically makes these translations.

And what about our personal VS code libraries? Is the API for WLColor and WLFont the same as it is for 3.1 Core? If charges are required, what are they? Will ...
CODE:
using System.Drawing;
need to be changed in the code libraries?

Yes, I already know I need to install Visual Studio 2022 for .NET 6.0 (and therefore WL8). We covered that earlier.

Thanks for converting the WL source libraries back to XML as in WL6. That adds more flexibility for future expansion. It might be nice to post the DataSet schema used to read the XML source files somewhere. If that schema is available in the WL libraries, which library is it? The XML deserializer needs to find it.
0
Glitch8
 ( 9.89% )
- ago
#2
Are you using System.Drawing to only use the Color class?

If so, you can just remove it and replace the Color with WLColor.

Like I said in the article, the interface is largely the same but you might run into some changes depending on how detailed your use of the Color class is.
0
- ago
#3
QUOTE:
Are you using System.Drawing to only use the Color class?

Yes, see code below ...
CODE:
      public int WashSales(BarHistory bars, Color washSaleShade, int shadeTransparency = 120)       {          ...          usb.SetBackgroundColor(bars, bar, Color.FromArgb(shadeTransparency, washSaleShade));          ...       }
But there are several instances where I'm using the Font class as well. Should I simply replace "using System.Drawing;" with both the WLColor and WLFont using references?

CODE:
Color msgColor = Color.FromArgb(255 - (int)(hueChked*255.0), (int)(hueChked*110.0), 0); //msg hue from red (hue=0) to dark green (hue=1) Font cornerFont = new Font("Arial", fontSize, FontStyle.Bold); usb.DrawText(cornerMsg, ts2frame.Count-17, yPosition, msgColor, fontSize, messagePane, false, cornerFont);
0
Glitch8
 ( 9.89% )
- ago
#4
Yes, you’ll discover that all these methods now expect a WLColor as a parameter and not a System.Drawing.Color.
0
- ago
#5
QUOTE:
expect a WLColor as a parameter and not a System.Drawing.Color

And what about DrawText(...)? See last code snippet above. Is it expecting a "WLFont" parameter instead of a "Font" parameter? Does there need for a using statement for WLFont?
0
Glitch8
 ( 9.89% )
- ago
#6
yes, and no, WLFont is already defined in WealthLab.Core so you’re covered.
1
- ago
#7
Hello!
I have a license for WL7 until 03/09/2023.
Intends to move to WL8.
For this transition, I followed your link: https://www.wealth-lab.com/blog/Migrating
The screenshot shows what follows the item: "Perform migration".

My WL7 is missing a button: "Run Migration".

Please give me an answer:
1. How do I upgrade from WL7 to WL8?
2. Will WL8 be paid or enjoyable for me? If paid, what is the cost?
0
- ago
#8
1. Just start WL8 and the button will appear there, not in WL7.
2. WL8 is free for you.
0
- ago
#9
Were custom indicators supposed to be migrated as well? My custom indicator was not. When I try to recreate it in WL8, the WL7 code throws errors in areas you pointed out, such as "PlotStyles", WLColor, PriceComponents, Parameter Types.

These are the sections that are showing errors.

CODE:
      //default color       public override Color DefaultColor       {          get          {             return Color.FromArgb(255, 0, 0, 255);          }       }       //default plot style       public override PlotStyles DefaultPlotStyle       {          get          {             return PlotStyles.Line;          }       }

CODE:
      //generate parameters       protected override void GenerateParameters()       {          AddParameter("Source", ParameterTypes.TimeSeries, PriceComponents.Close);          AddParameter("Lookback bars", ParameterTypes.Int32, 10);       }


How should I proceed?
0
- ago
#10
No, migration for indicators is a manual process of replacing old enums with new ones:

https://www.wealth-lab.com/Discussion/WL8-Any-guidelines-on-convert-compiled-strategies-from-7-to-8-7797
1
Glitch8
 ( 9.89% )
- ago
#11
Also, please hold off until Build 4 because there are some known issues with custom indicators that have been addressed there. It should be released in a few days.
0
- ago
#12
Thanks, Eugene. Made all the corrections and my strategies are running now.

A few things for future reference.
1. When I first saved the re-written indicator code, all the other stock indicators disappeared. They returned when I restarted in non-admin mode. (Possibly they disappeared when I entered in admin mode, but I didn't notice.)
2. When I tested the newly saved indicator by dropping on to a clean chart of a symbol, it gave the following user error:
QUOTE:
"Error parsing indicator: Value cannot be null."

I was unable to click the "OK" button because WL8 locked up. I had to kill app in task manager to exit. Was able to repeat this problem several times.
3. It took me some time to figure out how to format the new color syntax. I couldn't immediately find examples. I tried using some of the alternative formats in the QuickRef but all of them generated an error except for the 4 integer byte version above.

Amazing work on the migration tool!!! I didn't think it worked, it completed so quickly. Other than the issue above with the custom indicator, I didn't have to make any changes to any of my strategies or anything else. I have tested all my strategies from WL7 and they appear to be working fine.

Thanks for the nearly seamless transition from WL7 to WL8. Congrats to the team!
0
Glitch8
 ( 9.89% )
- ago
#13
Thanks for the report. The custom indicator issues are resolved for Build 4 🙂
0

Reply

Bookmark

Sort