So I initialize the price type to close via:
#region Variables private PriceType myPriceType1 = PriceType.Close; private PriceType myPriceType2 = PriceType.Close; #endregion
Then say I have something like:
protected override void OnBarUpdate() { MAFast.Set(EMA(periodFast)[0]); MASlow.Set(EMA(periodSlow)[0]); }
And in the Properties, I am capturing the user input via:
[Description("Price Type for Fast MA")] [Gui.Design.DisplayName("1.)Fast MA Type")] [Category("Parameters")] public PriceType MyPriceType1 { get { return myPriceType1; } set { myPriceType1 = value; } } [Description("Price Type for Slow MA")] [Gui.Design.DisplayName("2.)Slow MA Type")] [Category("Parameters")] public PriceType MyPriceType2 { get { return myPriceType2; } set { myPriceType2 = value; } }
What I want to do, is simply put that variable captured as a user input, into the portion on onBarUpdate() Like so:
MAFast.Set(EMA([COLOR="Magenta"]myPriceType2[/COLOR], periodFast)[0]);
But this doesn't work. How would I take the variable for the price type the user inputs and put it in there?
Comment