may be I'm on the wrong way with my little project so I will give you some more information what I'm trying to realize.
At the end I want to develop a MinMax process to find relavant minima and maxima of the underlying price process.
Befor I can do that I need some SAR process also based on this underlying price process that indicates whether the price is currently move up or down.
So this SAR process is needed as input for my MinMax process and should return alternating +1 and -1.
+1 in case the price moves up, -1 in case the price move down
My first SAR process should be constructed based on a standard MACD(12,26) with a signal line constructed out of EMA(9). To avoid that the SAR process produces false signals I also like to use a multiple of the average true range ATR(n) as some kind of threshold, i.e. the process should change its direction only when the distance of the MACD and signal line is above some minimal threshold.
I started coding this SAR process as an indicator based on SeriesCalculatorBaseWithValues. In a first step I used a fixed value as threshold in my SAR indicator class and all is working fine. The indicator is well plotted in the chart.
In a next step I like to use a multiple of the average true range as threshold and now I run into some problems, I do not know how to do this within my SAR indicator.
In another post http://www.rightedgesystems.com/forums/Topic11260-10-1.aspx
I read that because the RE.ATR implements IIndicator and my SAR indicator implements ISeriesCalculator it is not possible to use this ATR in my indicator class!
May be the SAR process I created should not be based on SeriesCalculatorBaseWithValues but I like to use all the advantages the indicator class give to me like displaying it in the indicator pane, changing attributes via the GUI and plotting it within the price pane or in a separate pane etc.
So is there any other solution to overcome my problem? Maybe create my SAR process on any other class which implements most of the advantages the indicator class does?
Thanks in advance for your help.
Sunday December 18 2011 by