Пример #1
0
 // SMAobj constructor with input parameters
 internal SMAobj(ref iSMA3 ea, int period, int threshold = 0) : this()   // do SMAobj() first
 {
     this.ea   = ea;
     Period    = period;
     Q         = new Queue <double>();
     Threshold = (double)threshold * 1e-6;
     firstrun  = true;
 }
Пример #2
0
 // SMAobj constructor
 internal SMAobj()
 {
     Period       = 50;
     Threshold    = 1 * 1e-6;
     Q            = null;
     isRrising    = false;
     isFalling    = false;
     trendDir     = 0;
     prevTrendDir = 0;
     prevState    = 0;
     trendChanged = false;
     stateChanged = false;
     value        = double.MinValue;
     prevValue    = value;
     prevTM       = DateTime.MinValue;
     ea           = null;
 }
Пример #3
0
        int e;              // number of bars for the indicator to calculate

        public iSMA3()
        {
            indicator_buffers      = 3;
            indicator_chart_window = true;
            MA_period        = 50;
            Threshold        = 0;
            PriceType        = PriceTypes.PRICE_OHLC;
            indicator_width1 = 2;               // width of line 1 on the chart
            indicator_color1 = Colors.Green;    // line color
            parent           = this;
            UpTrend          = new Array <double>();
            DownTrend        = new Array <double>();
            Mixed            = new Array <double>();
            firstrun         = true;
            simulate         = false;
            counted_bars     = 0;
            copyright        = "";
            link             = "";
        }