RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Question: Indicator Base Class That Exposes... Expand / Collapse
Message
Posted 2/20/2010 12:15:36 Post #10918
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
I'm trying to develop an indicator that will take as an input the entire bar, but also has the ability to lookback on the entire bar.

Based on the Creating an Indicator help file, I identified two potential base classes for this, but neither seems to do the job right.

IndicatorBase class takes as an input the entire bar in the CalcNextValue() method. But there doesn't seem to be a way (from what I can tell) to look back on previous bars without storing them in the indicator class.

SeriesCalculatorBaseWithValues takes an ISeries input, from which you can call the LookBack() method. However, you have to specify which series you want as an input (Open, High, Low, Close). Is there any way to make this take the entire bar?

My indicator will look back on previous highs and lows... thanks
Posted 2/22/2010 08:24:02 Post #10931
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
Inputs are always doubles, so in order to take the entire bar, you'd have to have 4 inputs (OHLC). Are you familiar with setting up an indicator to use multiple inputs? If not, I can give you a quick demonstration.

jamesluong (2/20/2010)
I'm trying to develop an indicator that will take as an input the entire bar, but also has the ability to lookback on the entire bar.

Based on the Creating an Indicator help file, I identified two potential base classes for this, but neither seems to do the job right.

IndicatorBase class takes as an input the entire bar in the CalcNextValue() method. But there doesn't seem to be a way (from what I can tell) to look back on previous bars without storing them in the indicator class.

SeriesCalculatorBaseWithValues takes an ISeries input, from which you can call the LookBack() method. However, you have to specify which series you want as an input (Open, High, Low, Close). Is there any way to make this take the entire bar?

My indicator will look back on previous highs and lows... thanks
Posted 3/1/2010 10:47:12 Post #10990
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
The best thing to do is probably to use IndicatorBase and store the list of previous bars yourself. You can use an RList<BarData> to store the bars easily.

Thanks,
Daniel
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 3:15pm

2005-2007 © RightEdge Systems