External variable using enum for two variables

 

I have an external variable that selects two Moving averages as a cross pair. this is then referencing a Case statement. I do this to reduce the number of parameter that are needed to speed up optimization.

extern int       ExtMACrossPair  = 2;


 switch(ExtMACrossPair)   //
     {
      case 1:
         FastMA = 3;
         SlowMA = 5;
         break;
      case 2:
         FastMA = 5;
         SlowMA = 8;
         break;
      case 3:
         FastMA = 8;
         SlowMA = 13;
         break;
      case 4:
         FastMA = 13;
         SlowMA = 21;
         break;
      case 5:
         FastMA = 5;
         SlowMA = 13;

     }

Is there a way to achieve the same outcome using enum to create a list, which then means i can have a better description for the external parameter?

 
CaptCaveman: Is there a way to achieve the same outcome using enum to create a list, which then means i can have a better description for the external parameter?
Not compiled. Not tested. Just typed.
enum MAlengths { MA0305= 305, // Fast=3 Slow=5
                 MA0508= 508, // Fast=5 Slow=8
                 MA0813= 813, // Fast=8 Slow=13
                 MA1321=1321, // Fast=13 Slow=21
                 MA1321=1321, // Fast=13 Slow=21
                 MA0513= 513} // Fast=5 Slow=13
input MAlengths ExtMACrossPair=MA305;
 
OnInit(){  
   SlowMA = ExtMACrossPair % 100;
   FastMA = ExtMACrossPair / 100;
   ⋮
}
Not compiled. Not tested. Just typed.