Optimizing a Combination Strategy
Author: Tims
Creation Date: 12/21/2020 7:39 PM
profile picture

Tims

#1
Hello,

I want to know if there is a way to optimize a Combination Strategy? I have 2 strategies in a combination strategy and I would like to optimize them together at the same time sharing the Equity Curve. Is there a way to do this or another program/addon available?
profile picture

Eugene

#2
Hello,

Sorry but this is not supported.

You should be able to optimize this kind of systems though:

WealthScript Techniques | MultiSystem, or Calling a Strategy From Another
profile picture

Tims

#3
It seems that it will work except for I am getting an error #CS0117 saying "'WealthLab.Strategies.System1' does not contain a definition for 'Run'". Did I not copy it correctly?

Thank you.
profile picture

Eugene

#4
Yes, of course.
profile picture

Tims

#5
I am taking rules based strategies converting it to code then copying and pasting it into the framework from the link you sent. Can you give me some guidance as to where the code should be pasted to?
profile picture

Eugene

#6
The idea is to wrap your converted code into a "Run" like method for each strategy involved, prefacing each WealthScript method with "obj." like shown in the Wiki example. Any strategy parameters go here below the curly brace:

CODE:
Please log in to see this code.


A system's logic is to be inserted here below this curly brace:

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

Tims

#7
Thank you I am having a lot of issues with "XXX" does not exist in current context have I not defined those items properly?
profile picture

Eugene

#8
My bad. One more thing missing in my reply above which should get rid of the "not exist" errors is that all WealthScript methods and properties e.g. Bars, SellAtStop must be prefaced with obj. since a WealthScript instance is passed to the method as "obj" (see: WealthScript obj).

You have to have some minimal C# coding knowledge to complete the task.
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).