Support Board
Date/Time: Sun, 24 Nov 2024 19:55:40 +0000
Post From: GetMovAvgType
[2013-11-21 09:43:16] |
100 - Posts: 147 |
Thank you very much! I added code to scstudy func here /*==========================================================================*/ SCFloatArrayRef MovingAverage_S(SCFloatArrayRef In, SCFloatArrayRef Out, unsigned int MovingAverageType, int Index, int Length) { switch (MovingAverageType) { case MOVAVGTYPE_EXPONENTIAL: return ExponentialMovingAverage_S(In, Out, Index, Length); case MOVAVGTYPE_LINEARREGRESSION: return LinearRegressionIndicator_S(In, Out, Index, Length); default: // Unknown moving average type case MOVAVGTYPE_SIMPLE: return SimpleMovAvg_S(In, Out, Index, Length); case MOVAVGTYPE_WEIGHTED: return WeightedMovingAverage_S(In, Out, Index, Length); case MOVAVGTYPE_WILDERS: return WildersMovingAverage_S(In, Out, Index, Length); case MOVAVGTYPE_SIMPLE_SKIP_ZEROS: return SimpleMovAvgSkipZeros_S(In, Out, Index, Length); case MOVAVGTYPE_SMOOTHED: return SmoothedMovingAverage_S(In, Out, Index, Length,0); case MOVAVGTYPE_ADAPTIVE: return AdaptiveMovAvg_S(In, Out, Index, Length,0); } } and to scconstants.h enum MovAvgTypeEnum { MOVAVGTYPE_EXPONENTIAL , MOVAVGTYPE_LINEARREGRESSION , MOVAVGTYPE_SIMPLE , MOVAVGTYPE_WEIGHTED , MOVAVGTYPE_WILDERS , MOVAVGTYPE_SIMPLE_SKIP_ZEROS , MOVAVGTYPE_SMOOTHED , MOVAVGTYPE_NUMBER_OF_AVERAGES , MOVAVGTYPE_ADAPTIVE }; Do I need to add any changes anywhere else to make additions to getmovavgtype ? Date Time Of Last Edit: 2013-11-21 09:43:57
|