I write an indicator that gives me the ability to call one of several MA's. (I used the Ninja MACrossBuilder as an example of how to do this) The pertinent code is as follows:
#region ------------------------- MA ASSIGNMENTS
switch (MA0Type)
{
case CDMAtype.DEMA:
MA0Series = DEMA(FastMAPeriod).Value;
break;
case CDMAtype.EMA:
MA0Series = EMA(FastMAPeriod).Value;
break;
case CDMAtype.HMA:
MA0Series = HMA(FastMAPeriod).Value;
break;
case CDMAtype.SMA:
MA0Series = SMA(FastMAPeriod).Value;
break;
case CDMAtype.TEMA:
MA0Series = TEMA(FastMAPeriod).Value;
break;
case CDMAtype.TMA:
MA0Series = TMA(FastMAPeriod).Value;
break;
case CDMAtype.VWMA:
MA0Series = VWMA(FastMAPeriod).Value;
break;
case CDMAtype.WMA:
MA0Series = WMA(FastMAPeriod).Value;
break;
case CDMAtype.ZLEMA:
MA0Series = ZLEMA(FastMAPeriod).Value;
break;
}
It compiles and works as expected. If I then try to add another MA say KAMA for this discussion, , I get an error, "'CDMAType does not contain a definition for 'KAMA'" Here's the modified code snippet:
#region ------------------------- MA ASSIGNMENTS
switch (MA0Type)
{
case CDMAtype.DEMA:
MA0Series = DEMA(FastMAPeriod).Value;
break;
case CDMAtype.KAMA:
MA0Series = KAMA(FastMAPeriod, 8).Value;
break;
case CDMAtype.EMA:
MA0Series = EMA(FastMAPeriod).Value;
break;
Any suggestions as to why I'm getting this error?
TIA

Comment