Profile Picture

array of indicators

Posted By omri1181 8 Years Ago
Message
Posted Friday April 03 2009
i tried to create an array by using
SeriesCalculatorBaseWithValues[] indicatorlist = {new BollingerBandLower(14, 1.5)};

then i did setinput...
but when i try to access it by
indicatorlist[0].count or .current
it's always empty.
i tried to do REGISTER or REGISTERMEMEBER but i could make it compile, didn't know which Iseries to give it, cause INPUTS is blocked.

i'd like to have an array which gives me acces both to
SeriesCalculatorBaseWithValues
and
IndicatorBase

i just want to be able to access several indicators using FOR loop.

is it possible ?
Posted Friday April 03 2009
Not sure I'm familiar with RegisterMember. However, I am surprised that it's not throwing an exception. BollingerBandLower requires inputs. So why not hold an instance for it like this:

// Allocate your indicatorList array (or use a List<>)

BollingerBandLower bbLower = new BollingerBandLower(14, 1.5)
bbLower.SetInputs(Close);
indicatorList[0] = bbLower;

BollingerBandUpper bbUpper = new BollingerBandUpper(14, 1.5)
bbUpper.SetInputs(Close);
indicatorList[1] = bbUpper;

omri1181 (4/3/2009)
i tried to create an array by using
SeriesCalculatorBaseWithValues[] indicatorlist = {new BollingerBandLower(14, 1.5)};

then i did setinput...
but when i try to access it by
indicatorlist[0].count or .current
it's always empty.
i tried to do REGISTER or REGISTERMEMEBER but i could make it compile, didn't know which Iseries to give it, cause INPUTS is blocked.

i'd like to have an array which gives me acces both to
SeriesCalculatorBaseWithValues
and
IndicatorBase

i just want to be able to access several indicators using FOR loop.

is it possible ?
Posted Saturday July 03 2010
Would love to see an answer to this post.
Posted Tuesday July 06 2010
I did reply to this post. Does my suggestion not work in your situation?
Posted Tuesday July 06 2010
Thanks Bill, for some reason I was not seeing your response in my previous view.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems