Strategy chart not drawing identically after resetting Windows
Author: Starburst
Creation Date: 8/29/2018 4:41 PM
profile picture

Starburst

#1
Hi,
I am having some issues with Wealth-Lab Pro version 6.9.19 64-bit Edition Build 1 running on my laptop computer using Windows 10. I have another laptop using Windows 10 with no issues. What started this issue is, WLP was working fine but Microsoft Edge had stopped working on this laptop and it would prompt me saying that something is wrong and I need to reset this PC. Resetting the PC required reinstalling some programs which included WLP. After resetting my PC and reinstalling WLP Edge now works fine but WLP is not. This is what is happening. If I start my strategy by using the open strategy icon on the function bar it does not execute all the strategy code. For example, If I had created a pane followed by drawing some horizontal lines on that pane the pane appears but not the horizontal lines along with some other chart annotations. But if the strategy is started by opening it in a workspace it runs fine. Any suggestion in resolving this issue? I have uninstalled and reinstalled WLP with no luck.


Thank you for your help.
profile picture

Eugene

#2
Hi,

If not the saved workspace where it runs correctly and/or the pane appearing I would say that your code has a dependency on a 3rd party library. Simply put, it requires an extension like Community Components to run which got deleted on reset of WLP (equal to clean installation). In this case, Strategy opens but doesn't run because there are compilation errors at the bottom of the Editor window.

Apart from user error i.e. saved workspace runs your "production" strategy while in "Open Strategy" you pick a "draft" version of it, the reason is not apparent. Would you give us more detail about what code lines are not executed correctly and what specific annotations are missing so we could have a focused discussion?
profile picture

Starburst

#3
Added Community Components and there is no change in the results.


The attachment Capture1 is a screen shot of my chart. The right side is the script loaded with the workspace. The left side is the script loaded with open strategy. Here is the code to make the script.

CODE:
Please log in to see this code.
profile picture

Eugene

#4
I didn't mean you should install C.Components. This was just an example of a possible dependency in your own code - like C.Indicators is in this case. Nonetheless, this is not where the problem is rooted since your code compiles and runs for you.

More so it runs on my machine the way it does on the right of your screenshot (the workspace version) regardless of data provider, intraday bar scale, data range and instrument. There always are red/blue dotted lines (DrawLine @ line 293+), up/down bar count in the ValueChart pane (AnnotateBar @ line 90+) and other elements missing on the left side.

So, check that your workspace runs the identic copy of the strategy. There may be a draft version in a different folder.
profile picture

Starburst

#5
If I do a search for the strategy name only one strategy appears in the results.

As for the picture on the right if I enter the editor do a select all, copy, and paste the code it into a “new strategy from code” the code will compile but when executed the results are what appears on the left of the picture.
profile picture

Eugene

#6
Interesting observation. And my results are always like on the right side of your screenshot so we've encountered a roadblock called "not repro". To debug your strategy I'd suggest you use PrintDebug or Visual Studio debugger (depending on your skills).
profile picture

Cone

#7
Is the code above from the left or the right instance? (I know it shouldn't matter, but...)
profile picture

Starburst

#8
Yes, I have taken the code from the right pasted it in a new strategy and it comes out like the left.


My programing skill is not high just a hack.
profile picture

Eugene

#9
In this case I'd plant PrintDebug directives on top of the code paths that fail to execute.
profile picture

Starburst

#10
Ok what would that entail? Can you remotely connect and look at my system? Or maybe it would be easier to reset windows again and reinstall all the programs it removes. Why would the indicator values in the right side margin disappear?
profile picture

Eugene

#11
Our team is very busy with internal projects but you could try inserting PrintDebug() statements in your code to understand why certain branch of code isn't executed or some variable has an unexpected value. Hit F11 to look up PrintDebug in the QuickRef if you haven't done so before.

Unless you don't have a better idea how to spend an hour, please don't reset Windows. On our position re: reinstallation of WLP, check out the Wiki FAQ: I have a problem. Tried to reinstall Wealth-Lab, but it didn't help!
profile picture

Starburst

#12
Wow!! I inserted a PrintDebug() statement into my code and executed it. I saw no change and nothing looked obvious if there was any change. So I started scrolling though the bars and low and bold I get near the beginning about bar 115 it all turns on. The lines in the created panes, indicator values in the margins, and all the dots. I then turn on steaming and it goes back or off. Scroll back to the beginning it comes back on appears to be working fine. Close the strategy reopen it and it is not working right. Scroll to the beginning and it starts working right or displaying correctly.
profile picture

Eugene

#13
Solution:

Switch the left chart to Linear Axis Scale (Function toolbar). It's Semi-Log now while the workspace version has been Linear. Case closed.

P.S.
QUOTE:
Wow!! I inserted a PrintDebug() statement into my code and executed it.

Even though it's not required anymore but what change did you expect from printing an empty line to the debug log? Not sure if I got my point spelled out correctly: PrintDebug is not some silver bullet. You build output strings (much like you do with AnnotateBar or DrawText) and insert them rationally to evaluate the state of variables at certain branches of code. This tedious procedure is poor man's debugging.
profile picture

Starburst

#14
Yes I understand what you were trying to convey about PrintDebug. I had a strong feeling that this was going to be something foolish on my part. The PrintDebug did force me to look at the whole chart. I would like to thank you and Cone for all your help and professionalism into this matter. Keep up the great work.
profile picture

Eugene

#15
Glad I could be of assistance!

BTW, not sure if the missing cosmetic items is a bug or feature of Semi-Log scale but we have to live with this.

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).