public override void Init()
        {
            if (showAlligator)
            {
                initAlligator();
            }
            fast_ao = IndicatorsManager.BuildIn.MA((int x) => { return((High(x) - Low(x)) / 2); }, fastLength, MAMode.SMA);
            slow_ao = IndicatorsManager.BuildIn.MA((int x) => { return((High(x) - Low(x)) / 2); }, slowLength, MAMode.SMA);
            ac      = IndicatorsManager.BuildIn.MA((int x) => { return(fast_ao.GetValue(x) - slow_ao.GetValue(x)); }, smoothLength, MAMode.SMA);

            oneAlert = false;


            if (showMFI)
            {
                mfiOffsetPrimitive = 70 * HistoryDataSeries.HistoricalRequest.Instrument.MinimalTickSize;
                mfiOffsetText      = mfiOffsetPrimitive + 140 * HistoryDataSeries.HistoricalRequest.Instrument.MinimalTickSize;

                fillMFI();
            }

            if (showIdealFractal || showResSup || showSignal)
            {
                initAlligator();
                fillMFI();
            }
        }
        private void initAlligator()
        {
            Lines[0].TimeShift = JawMAShift;
            Lines[1].TimeShift = TeethMAShift;
            Lines[2].TimeShift = LipsMAShift;

            jawMa   = IndicatorsManager.BuildIn.MA(HistoryDataSeries, JawMAPeriod, JawMAType, 0, JawSourcePrice);
            teethMa = IndicatorsManager.BuildIn.MA(HistoryDataSeries, TeethMAPeiod, TeethMAType, 0, TeethSourcePrice);
            lipsMa  = IndicatorsManager.BuildIn.MA(HistoryDataSeries, LipsMAPeiod, LipsMAType, 0, LipsSourcePrice);
        }
        public override void Init()
        {
            // native TE build-in indicator Momentum;
            momentum = IndicatorsManager.BuildIn.Momentum(HistoryDataSeries, momPeriod);

            // custom wrapper for build-in indicator Momentum;
            MTST_momentum = AddCustom("MTST_momentum", (value) => {
                return(value);
            }) as CUSTOM;
        }
Beispiel #4
0
        public override void Init()
        {
            esa = IndicatorsManager.BuildIn.MA((int x ) => {
                return(HLC3(x));
            }, ChannelPeriod, MAMode.EMA);

            d = IndicatorsManager.BuildIn.MA((int x) => {
                return(absD[x]);
            }, ChannelPeriod, MAMode.EMA);

            wt2 = IndicatorsManager.BuildIn.MA((int x) => {
                return(Lines[0].GetValue(x));
            }, 4, MAMode.SMA);
        }
 public override void Init()
 {
     custom = IndicatorsManager.CreateInstance("MFI", new object[] { "mfiPeriod", mfiPeriod }, HistoryDataSeries);
 }
Beispiel #6
0
 public override void Complete()
 {
     esa = null;
     d   = null;
     wt2 = null;
 }
Beispiel #7
0
        public override void Init()
        {
            ma = IndicatorsManager.BuildIn.MA(HistoryDataSeries, period, maType);

            OrdersManager.OnFill += OnFill;
        }
 /// <summary>
 /// This function will be called after creating
 /// </summary>
 public override void Init()
 {
     //minColor, maxColor is additional parameters for custom indicator
     customIndicator = IndicatorsManager.BuildIn.Custom("CustomIndicator", HistoryDataSeries, minColor.ToArgb(), maxColor.ToArgb());
 }
Beispiel #9
0
 /// <summary>
 /// This function will be called after creating
 /// </summary>
 public override void Init()
 {
     _atr   = IndicatorsManager.BuildIn.ATR(HistoryDataSeries, _atrPeriod);
     _trend = IndicatorsManager.BuildIn.MA(HistoryDataSeries, 80, MAMode.SMA);
 }