Profile Picture

Is there a way to map an index value of CalcNewValue method's parameter to date

Posted By dssdish 5 Years Ago

Is there a way to map an index value of CalcNewValue method's...

Message
Posted Monday April 09 2012
I'm writing an indicator by extending SeriesCalculatorBaseWithValues class.

CalcNewValue method has an index parameter. It would make it easier to debug if there is a way to map an index value to the date of the bar.

thanks.

Posted Tuesday April 10 2012
Sorry, there isn't currently a way to get the bar's date from an indicator of that type.

Thanks,
Daniel
Posted Tuesday April 10 2012
let me rephrase it.

My indicator gets Open (ISeries) as input for example. The index tells me which value from Open ISeries that I should use to calculate my indicator's value. I call Open.lookback(index) to get the proper value.

Is there a way to tell which day's open price that Open.lookback(index) actually returns? I thought this would be a common needs.

Posted Wednesday April 11 2012
In RightEdge, there are two types of indicators you can write- "series calculators" or "indicators". Series calculators can have arbitrary input series, but they just see them as a series of numbers, with no dates associated with them. "Indicators" (which derive from IndicatorBase), get a series of bars as the input. So they have access to all the bar values as well as the date/time of each bar. However, they don't support other arbitrary inputs.

I recognize that this isn't ideal. The fact that you can't get the date from a series calculator is one of several problems with the system. In some future version of RightEdge we may revamp the indicator system and fix these issues. For now, if you really need the date you need to derive from IndicatorBase.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems