My strategies use a lot of common code, and only a small portion of the code in each strategy is unique to that strategy. Is it possible to create as class library or something similar in Wealth-Lab which would allow my strategies to just contain the unique code and call the class library for the common code. The following is a toy example to demonstrate what I would like to do:
CODE:
Please log in to see this code.
Apart from making my strategies much smaller, if I do have to make changes to my common code, I would only have to make the change once in the class library instead of changing each strategy.
Size:
Color:
Size:
Color:
Thanks Eugene.
I assumed I could call a .dll created in Visual Studio, but I was hoping to be able to program it directly in Wealth-Lab. I'll have to play with programming strategy code in Visual Studio.
I saw the forum post before I started this thread, but I'll see if Community Components is more helpful.
Size:
Color:
I solved my own problem.
Size:
Color:
This does generate a trade for me. Have you ever used AutoStops, EnterAtPrice/ExitAtPrice (or Limit On Open Orders), ImportHistoricalTrades or
Interacting with Portfolio Equity? In C.Components they've all been serving the same purpose to its many users.
Size:
Color:
QUOTE:
but I was hoping to be able to program it directly in Wealth-Lab. ... I solved my own problem.
Kurt, would you elaborate on your solution? Were you able to do this without having to use Visual Studio and creating a .dll?
Size:
Color:
QUOTE:
I solved my own problem.
Shortly after seeing my reply author has edited his post, removing his question and some example code. That's why the confusion i.e. his post #4 looking like the answer to post #1 (it's not).
QUOTE:
Were you able to do this without having to use Visual Studio and creating a .dll?
You can refer to the FAQ in post #2 on this one. It holds true.
Size:
Color:
OK, thanks for clarifying Eugene. I'll refer to the FAQ again.
Size:
Color:
I'm using Virtual Studio to create a .dll.
Size:
Color:
QUOTE:
https://www.wealth-lab.com/Forum/Posts/Simple-example-using-WealthScript-as-class-library-from-Visual-Studio-34034
I'm assuming Edit and Continue doesn't work when building a class library because Wealth-Lab keeps the class library in memory, so it has to be restarted to use the rebuilt class library, or am I missing something?
Size:
Color:
Size:
Color:
Thank you so much. I hadn't seen the second one, which is why I only thought it applied to building strategy code. I installed the community edition of Visual Studio 2017 and it does work like a charm. I can't believe how many hours I've wasted using my pro version of Visual Studio 2013!
fyi - I saw a great suggestion on stackoverflow to make the Break Mode tab very small and then drag and attach it to the Call Stack window, making it much easier to ignore.
Size:
Color: