示例#1
0
 public MovingAverage(Instrument inst, int tf, int period, MAMethodType method, PriceType applyTo)
     : base(inst, tf)
 {
     this.period  = period;
     this.method  = method;
     this.applyTo = applyTo;
 }
示例#2
0
        protected override void addIndicators()
        {
            MAMethodType ma1Method = (MAMethodType)this["MA1Method"];
            PriceType    ma1apply  = (PriceType)this["MA1Apply"];

            addIndicator("MA1", new MovingAverage(container.DefaultInstrument, container.DefaultPeriod,
                                                  (int)this["MA1"], ma1Method, ma1apply));
        }