I need to add a second TimeSeries (lowestSpread) line to an indicator I have developed, so that when the indicator class is used in a strategy, both lines are visible.
How can I realize that in WL7?
How can I realize that in WL7?
Rename
To plot multiple indicators together you should use the Companions property:
https://www.wealth-lab.com/Support/ApiReference/IndicatorBase
For example, the FAMA indicator would override Companions as follows and for its companion MAMA indicator it would be vice versa:
https://www.wealth-lab.com/Support/ApiReference/IndicatorBase
For example, the FAMA indicator would override Companions as follows and for its companion MAMA indicator it would be vice versa:
CODE:
public override List<string> Companions { get { List<string> c = new List<string>(); c.Add("MAMA"); return c; } }
Thanks.
Sounds like I need to program the same indicator twice, just under a different name and output to build the dependency from the primary to the secondary indicator, right?
Sounds like I need to program the same indicator twice, just under a different name and output to build the dependency from the primary to the secondary indicator, right?
No. According to your screenshot this is not the same but two different indicators. Each indicator implements the Companions property in its own way.
If it’s a building block strategy then there’s really no way to plot an additional line. BB strategies don’t plot indicator Companions, that’s just drag and drop. If it’s a C# coded Strategy then of course you just plot anything you like.
Are you looking for this in a BB Strategy?
Are you looking for this in a BB Strategy?
@Glitch
No, it's plain vanilla indicatior developed from scratch.
If I look at the Comanions Property, there's a hardcoded external indicator name attached to the property so I wonder, how to combine/overlap two TimeSeries (like spread and lowestSpread) in a single Indicator, without referencing any external "hardcoded" indicators.
In addition, I wonder how to catch these two TimeSeries values later using a startegie implementiation? In Ninjatrader this was quite simple, because this was exposed via public properties.
Has this been implemented similarly in Wealth Lab 7?
No, it's plain vanilla indicatior developed from scratch.
If I look at the Comanions Property, there's a hardcoded external indicator name attached to the property so I wonder, how to combine/overlap two TimeSeries (like spread and lowestSpread) in a single Indicator, without referencing any external "hardcoded" indicators.
In addition, I wonder how to catch these two TimeSeries values later using a startegie implementiation? In Ninjatrader this was quite simple, because this was exposed via public properties.
Has this been implemented similarly in Wealth Lab 7?
No it’s not implemented like this in WL. In WL each indicator is its own class. If you want a strategy to reference two indicators, it can create an instance of each of the 2 indicators.
Your Response
Post
Edit Post
Login is required