the code that invokes MAType is declared as a private MAType in the variables section and then properly get/set in the properties section. and it's used inside of OnBarUpdate via a switch() statement to plot lines using the selected MAType.
when i copied my enum code from indicator#1 (which works great) to indicator#2, i started getting errors when i tried to compile it ... from what i can tell, the only way to complie it is to change the name of the enum (eg. from MAType to Indicator2MAType).
if i understand this correctly, it's b/c i have something "public" that is outside of the context of just this indicator. i'm not a c# expert, but something tells me this may not be the best-practice way to do an enum.
so two questions:
1) is there a way to isolate this code inside of the Indicator{} section so that i can just copy/paste the code over and over again (thinking the answer is no, and would love to know "why");
2) assuming there's a very good reason for a "no" answer to #1 above, where might one put a "global" type like this? can i make a file called MAType.cs and drop it somewhere and then invoke it from within indicator#1 and indicator#2
sorry for the super-geeky question here, but i would rather do it the right way than continue to hack things.
final comment ... i noticed that PriceType works pretty much like what i'm trying to do with MAType ... so another way of asking #2 would be: how do i make my MAType work like PriceType

thanks in advance for any ideas,
-e

Comment