Greetings!
You know each indicator based on DataSeries. It means that indicator can retrieve only one line. Some of indicators are multilined like Ichimoku, ADX ect. I see 2 different solutions for coding such indicators. The fist one: code each line as separate indicator. The socond one: assign each line as a parameter for indicator. Tell me which solution is correct for WLD concepts?
Size:
Color:
You're right, one indicator = one DataSeries.
Although some indicators (usually, Bands) have a companion indicator (e.g. BBandUpper/BBandLower) and can be nicely plotted as one using PlotSeriesFillBand or PlotSeriesDualFillBand, still, these are two separate indicators linked together using the documented PartnerBandIndicatorType property. (Check out
Create an Indicator Library in the Wealth-Lab Wiki for more.)
Not sure what you mean by assigning an indicator (DataSeries) as a parameter - these are
input parameters, not
output. So coding each line as a separate indicator is what works for us.
Size:
Color:
I try to describe the second solution. When the indicator has more then 2 lines like Ichimoku i thing we can do the following:
In IndicatorHelper class:
CODE:
Please log in to see this code.
where
CODE:
Please log in to see this code.
In the main code you just use construction like switch to get Up Down or Neutral line. Finally as enum you can see it in the input parameter. As in the 1st solution you need to place this indicator on chart more than 1 time. But you dont't need to see all the lines of indicator. You put one indicator, then choose the line you want to see. I think it's better solution. What do you think?
Size:
Color:
I see your point, although it's not a true multi-point indicator. It's a good solution as the Strategy Parameters box could be used to get an indicator's line on demand by utilizing a switch/case block.
Size:
Color: