I saw that NT offers more than a dozen moving averages (SMA, EMA, DEMA, HAMA, etc.) and I would like to test them in my custom strategy
For example:
EMA(10).Overlay = true; EMA(10).Plots[0].Pen.Color = Color.DarkOrange; Add(EMA(10)); [...] && CrossAbove(EMA(10), EMA(40), 1)
How can I create a "private variable" I would define and thus I would have only 1 change to make to test a new moving average?
I've tried this but it generates CS0130 errors
private string vmyma = @"EMA"; // Default setting for Vmyma [...] Vmyma(Vma1).Overlay = true; Vmyma(Vma1).Plots[0].Pen.Color = Color.DarkOrange; Add(Vmyma(Vma1)); [...] && CrossAbove(Vmyma(Vma1), Vmyma(Vma2), 1) [...] [Description("")] [GridCategory("Parameters")] public string Vmyma { get { return vmyma; } set { vmyma = value; } }
All the best,
Chris
Comment