I am developing a strategy where the user may elect EMA/HMA/SMA as their moving average type.
I would like to declare a variable that is then assigned to the moving average type selected by the user. For example:
XXXX myMA; (where XXXX is the variable type)
If the user selects EMA, myMA is converted from a generic indicator type to EMA. If SMA is selected, myMA becomes a variable of type SMA.
Is there a generic indicator class to which I can assign myMA before it gets assigned to the user-selected MA type?
Thank you.
Comment