If you don't want them to have to select a series, you'd want to look at the IndicatorBase derived sample. It doesn't take any inputs (it always uses the closing price).
However, based on your second question, we have a bit of a chicken and egg problem. The way we support "smoothing" or what we call "chaining" requires/allows the user to specify the series (closing price, another indicator series, a custom series, etc). If you wanted to smooth something without user input, let's say you wanted an SMA of an SMA, I would use the SeriesCalculatorBaseWithValues. You can store state here so you can create an instance of SMA1 and when you have enough bars to calc SMA2 you can refer back to SMA1 to calc SMA2. The Reset() function is notification for you to flush any cached calculations you may have.
Does that sound like it might work?
Emerald King (4/5/2007)
I have loaded up the VB.Net Sample SeriesCalculatorBaseWithValuesIndicator
Complied and copied it over to the plugin directory and restarted RE, when I add it to a chart it throws an execption.
Now when I add this line
<SeriesInputAttribute(Name:="Input", Order:=1, Value:=BarElement.Close)> _
It works just fine. I understand that when I add this line to the code it is telling RE to allow the user to select what type of Series to use. How can I get that sample to work without allowing the user to select which Series to use?
Next question, what is the best way to implement this type of smoothed SMA within a custom indicator dll?
Sum = SSMA[Index+1] * (MA_Length-1) + Close[Index];
SSMA[Index] = Sum/MA_Length);
Thank you for your Time