Ejemplo n.º 1
0
 protected override void Initialize()
 {
     _frac1 = CreateDataSeries();
     _frac2 = CreateDataSeries();
     _pf = CreateDataSeries();
     _macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
 }
Ejemplo n.º 2
0
        protected override void OnStart()
        {
            i_MACD_main = Indicators.MacdHistogram(MarketSeries.Close, (int)_Period_SlowEMA, (int)_Period_FastEMA, (int)_Period_MACD_SMA);
            i_MCAD_signal = Indicators.MacdHistogram(MarketSeries.Close, (int)_Period_SlowEMA, (int)_Period_FastEMA, (int)_Period_MACD_SMA);
            i_MA_Close = Indicators.SimpleMovingAverage(MarketSeries.Close, 1);
            i_Parabolic_SAR = Indicators.ParabolicSAR(_Step_PrbSAR, 0.1);
            i_MA_Open = Indicators.SimpleMovingAverage(MarketSeries.Open, 1);
            i_EMAf = Indicators.ExponentialMovingAverage(MarketSeries.Close, (int)_Period_FastEMA);

        }
Ejemplo n.º 3
0
        protected override void OnStart()
        {
            _hmafastshift = Indicators.GetIndicator <HMAFastShift>(FastPeriod, FastShift);
            _hmaslowshift = Indicators.GetIndicator <HMASlowShift>(SlowPeriod, SlowShift);
            _macd         = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi           = Indicators.RelativeStrengthIndex(Source, Periods);
            HmaDaySeries  = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal     = Indicators.GetIndicator <HMAHTFSHIFT>(HmaDaySeries, 21, 0, false, false, 3, false, 24);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 4
0
        protected override void OnStart()
        {
            label   = "Conejo V3 " + Symbol.Code + " " + TimeFrame.ToString();
            hmafast = Indicators.GetIndicator <HMAfast>(FastPeriods);
            hmaslow = Indicators.GetIndicator <HMAslow>(SlowPeriods);
            _macd   = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi     = Indicators.RelativeStrengthIndex(Source, Periods);
            _SSR    = Indicators.GetIndicator <SinewaveSupportResistance>(MarketSeries, 0.07);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 5
0
        protected override void OnStart()
        {
            label    = "Bladerunner Major" + Symbol.Code + " " + TimeFrame.ToString() + " / " + GlobalTimeFrame.ToString();
            tendency = Indicators.GetIndicator <CandlestickTendencyII>(GlobalTimeFrame, MinimumGlobalCandleSize);
            index    = MarketSeries.Close.Count - 1;
            _macd    = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            _adx     = Indicators.GetIndicator <ADXR>(Source, interval);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 6
0
        protected override void OnStart()
        {
            hmafast      = Indicators.GetIndicator <HMAfast>(5);
            hmaslow      = Indicators.GetIndicator <HMAslow>(31);
            _macd        = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            HmaDaySeries = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal    = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);


            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 7
0
        protected override void OnStart()
        {
            label    = "Bladerunner Major" + Symbol.Code + " " + TimeFrame.ToString() + " / " + HighOrderTimeFrame.ToString();
            tendency = Indicators.GetIndicator <CandlestickTendency>(HighOrderTimeFrame);
            index    = MarketSeries.Close.Count - 1;
            _hmaslow = Indicators.GetIndicator <HMAslow>(31);
            _macd    = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi      = Indicators.RelativeStrengthIndex(Source, Periods);
            _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 8
0
        protected override void OnStart()
        {
            label    = "The Major V2 " + Symbol.Code + " " + TimeFrame.ToString() + " / " + HighOrderTimeFrame.ToString();
            tendency = Indicators.GetIndicator <CandlestickTendency>(HighOrderTimeFrame);
            index    = MarketSeries.Close.Count - 1;
            _hmaslow = Indicators.GetIndicator <HMAslow>(SlowPeriods);
            _macd    = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi      = Indicators.RelativeStrengthIndex(Source, Periods);
            _SSR     = Indicators.GetIndicator <SinewaveSupportResistance>(MarketSeries, Alpha);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 9
0
 protected override void OnStart()
 {
     _botName       = ToString();
     _instanceLabel = string.Format("{0}-{1}-{2}-{3}-{4}", _botName, _botVersion, Symbol.Code, TimeFrame.ToString(), GlobalTimeFrame.ToString());
     tendency       = Indicators.GetIndicator <CandlestickTendencyII>(GlobalTimeFrame, MinimumGlobalCandleSize);
     tendency2      = Indicators.GetIndicator <CandlestickTendencyII_2>(GlobalTimeFrame2, MinimumGlobalCandleSize2);
     _macd          = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
     _emaFast       = Indicators.ExponentialMovingAverage(Price, FastPeriods);
     _adx           = Indicators.GetIndicator <ADXR>(Source, interval);
     _cci           = Indicators.GetIndicator <CCI>(CCI_period);
     _heiken        = Indicators.GetIndicator <HeikenAshi2>(1);
     _emasignal     = Indicators.GetIndicator <ExponentialSignal>(20);
 }
Ejemplo n.º 10
0
        protected override void OnStart()
        {
            _instanceLabel = "Heiken CCI Adxr" + " " + Symbol.Code + " " + TimeFrame.ToString();
            _macd          = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            _emaFast       = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            _adx           = Indicators.GetIndicator <ADXR>(Source, interval);
            _cci           = Indicators.GetIndicator <CCI>(CCI_period);
            _heiken        = Indicators.GetIndicator <HeikenAshi2>(1);
            index          = MarketSeries.Close.Count - 1;


            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 11
0
        protected override void OnStart()
        {
            tendency = Indicators.GetIndicator <CandlestickTendencyII>(GlobalTimeFrame, MinimumGlobalCandleSize);
            index    = MarketSeries.Close.Count - 1;
            _macd    = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            _adx     = Indicators.GetIndicator <ADXR>(Source, interval);

            //Positions.Opened += PositionsOnOpened;
            //Positions.Closed += PositionsOnClosed;

            DEBUG         = true;
            botName       = ToString();
            instanceLabel = botName + "-" + BotVersion + "-" + Symbol.Code + "-" + TimeFrame.ToString();

            stopLoss          = TakeProfit * StopLossFactor;
            Positions.Opened += OnPositionOpened;

            int corner = 1;

            switch (corner)
            {
            case 1:
                corner_position = StaticPosition.TopLeft;
                break;

            case 2:
                corner_position = StaticPosition.TopRight;
                break;

            case 3:
                corner_position = StaticPosition.BottomLeft;
                break;

            case 4:
                corner_position = StaticPosition.BottomRight;
                break;
            }

            if (!DEBUG)
            {
                ChartObjects.DrawText("BotVersion", botName + " Version : " + BotVersion, corner_position);
            }


            Print("The current symbol has PipSize of: {0}", Symbol.PipSize);
            Print("The current symbol has PipValue of: {0}", Symbol.PipValue);
            Print("The current symbol has TickSize: {0}", Symbol.TickSize);
            Print("The current symbol has TickSValue: {0}", Symbol.TickValue);
        }
Ejemplo n.º 12
0
        protected override void OnStart()
        {
            label      = "Colonel V1 " + Symbol.Code + " " + TimeFrame.ToString() + " / ";
            _fastMa    = Indicators.MovingAverage(SourceSeries, FastPeriods, MAType);
            _slowMa    = Indicators.MovingAverage(SourceSeries, SlowPeriods, MAType);
            _macd      = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi        = Indicators.RelativeStrengthIndex(Source, Periods);
            _SSR       = Indicators.GetIndicator <SinewaveSupportResistance>(MarketSeries, Alpha);
            _moneyFlow = Indicators.MoneyFlowIndex(MFIPeriod);
            _parabolic = Indicators.ParabolicSAR(minaf, maxaf);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 13
0
        protected override void OnStart()
        {
            hmafast      = Indicators.GetIndicator <HMAfast>(5);
            hmaslow      = Indicators.GetIndicator <HMAslow>(31);
            _macd        = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            HmaDaySeries = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal    = Indicators.GetIndicator <HMASignals>(HmaDaySeries, 21, false, false, 3, false, 24);

            var dailySeries = MarketData.GetSeries(TimeFrame.Daily);

            atr = Indicators.AverageTrueRange(dailySeries, 20, MovingAverageType.Simple);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
Ejemplo n.º 14
0
        protected override void Initialize()
        {
            ExpiryDate = new DateTime(2017, 2, 7, 0, 0, 0);
            if (DateTime.Now > ExpiryDate)
            {
                ChartObjects.DrawText("TheText", Expired, StaticPosition.Center, Colors.Red);
                return;
            }
            Bullet = theBullet[Draw_String];

            LTF_Series = MarketData.GetSeries(LTF);
            RSI        = Indicators.RelativeStrengthIndex(MarketSeries.Close, Periods);
            EMA        = Indicators.ExponentialMovingAverage(LTF_Series.Close, MA_Period);
            Mac        = Indicators.MacdHistogram(LTF_Series.Close, 26, 12, 9);
        }
Ejemplo n.º 15
0
        protected override void OnStart()
        {
            label      = "TheMajorV2PSarMulti" + Symbol.Code + " " + TimeFrame.ToString() + " / " + HighOrderTimeFrame.ToString();
            tendency   = Indicators.GetIndicator <CandlestickTendency>(HighOrderTimeFrame);
            index      = MarketSeries.Close.Count - 1;
            _macd      = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            rsi        = Indicators.RelativeStrengthIndex(Source, Periods);
            _SSR       = Indicators.GetIndicator <SinewaveSupportResistance>(MarketSeries, Alpha);
            _zigzag    = Indicators.GetIndicator <ZigZag>(ZzDepth, ZzDeviation, ZzBackStep);
            _moneyFlow = Indicators.MoneyFlowIndex(MFIPeriod);
            _parabolic = Indicators.ParabolicSAR(minaf, maxaf);

            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
        protected override void Initialize()
        {
            Bullet = theBullet[Draw_String];
            Enum.TryParse(upColor, out UpColor);
            Enum.TryParse(dnColor, out DnColor);


            ///////*******************************************************
            Mac = Indicators.MacdHistogram(MarketSeries.Close, LongCycle, ShrtCycle, Signal);
            EMA = Indicators.ExponentialMovingAverage(MarketSeries.Close, Period);

            if (Num_TF > 4)
            {
                veryLongTF_Series = MarketData.GetSeries(vRef_TF);
                Mac_veryLongTF    = Indicators.MacdHistogram(veryLongTF_Series.Close, LongCycle, ShrtCycle, Signal);
                EMA_veryLongTF    = Indicators.ExponentialMovingAverage(veryLongTF_Series.Close, Period);
            }

            if (Num_TF > 3)
            {
                LongTF_Series = MarketData.GetSeries(Ref_TF);
                Mac_LongTF    = Indicators.MacdHistogram(LongTF_Series.Close, LongCycle, ShrtCycle, Signal);
                EMA_LongTF    = Indicators.ExponentialMovingAverage(LongTF_Series.Close, Period);
            }

            if (Num_TF > 2)
            {
                MedTF_Series = MarketData.GetSeries(Med_TF);
                Mac_MedTF    = Indicators.MacdHistogram(MedTF_Series.Close, LongCycle, ShrtCycle, Signal);
                EMA_MedTF    = Indicators.ExponentialMovingAverage(MedTF_Series.Close, Period);
            }

            if (Num_TF > 1)
            {
                SmallTF_Series = MarketData.GetSeries(Lil_TF);
                Mac_SmallTF    = Indicators.MacdHistogram(SmallTF_Series.Close, LongCycle, ShrtCycle, Signal);
                EMA_SmallTF    = Indicators.ExponentialMovingAverage(SmallTF_Series.Close, Period);
            }



            ////////////***********************************************
        }
Ejemplo n.º 17
0
        protected override void OnStart()
        {
            cBotLabel         = "Jaws V1" + " " + Symbol.Code;
            hmafast           = Indicators.GetIndicator <HMAfast>(5);
            hmaslow           = Indicators.GetIndicator <HMAslow>(31);
            HmaDaySeries      = MarketData.GetSeries(TimeFrame.Minute15);
            hmaSignal         = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);
            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
            _macd             = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            _emaFast          = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            // Start Time is the same day at 08:00:00 Server Time
            _startTime = Server.Time.Date.AddHours(StartTime);

            // Stop Time is the same day at 21:00:00
            _stopTime = Server.Time.Date.AddHours(StopTime);

            Print("Start Time {0},", _startTime);
            Print("Stop Time {0},", _stopTime);
        }
Ejemplo n.º 18
0
        protected override void Initialize()
        {
            // Calculate TDI components
            _rsi            = Indicators.RelativeStrengthIndex(Source, RsiPeriod);
            _bollingerBands = Indicators.BollingerBands(_rsi.Result, Volatility, StDev, MovingAverageType.Simple);
            _price          = Indicators.MovingAverage(_rsi.Result, PricePeriod, PriceMaType);
            _signal         = Indicators.MovingAverage(_rsi.Result, SignalPeriod, SignalMaType);

            // colorize Lines
            ChartObjects.DrawHorizontalLine("68", 68, Colors.Red, 1, LineStyle.Lines);
            ChartObjects.DrawHorizontalLine("63", 63, Colors.OrangeRed, 1, LineStyle.Lines);
            ChartObjects.DrawHorizontalLine("50", 50, Colors.Orange, 1, LineStyle.Solid);
            ChartObjects.DrawHorizontalLine("37", 37, Colors.PaleGreen, 1, LineStyle.Lines);
            ChartObjects.DrawHorizontalLine("32", 32, Colors.LimeGreen, 1, LineStyle.Lines);

            // Elders Impulse
            if (enable_EldersImpulse)
            {
                EMA = Indicators.ExponentialMovingAverage(MarketSeries.Close, EMAPeriod);
                Mac = Indicators.MacdHistogram(LongCycle, ShrtCycle, Signal);
            }
            // graphic objects
            arrowOffset = Symbol.PipSize * 5;
        }
Ejemplo n.º 19
0
        public int GetOpenConfidence(out double price, out double stopLoss, out double takeProfit)
        {
            price      = 0;
            stopLoss   = 0;
            takeProfit = 0;
            macd       = algo.Indicators.MacdHistogram(algo.MarketSeries.Close, 26, 12, 9);
            ema        = algo.Indicators.ExponentialMovingAverage(algo.MarketSeries.Close, 20);

            var emaDatas  = new double[6];
            var macdDatas = new double[6];

            for (int i = 1; i < 7; i++)
            {
                double upper = algo.MarketSeries.High.Last(i);
                double lower = algo.MarketSeries.Low.Last(i);

                if (upper < lower)
                {
                    return(0);
                }

                var emaData  = ema.Result.Last(i);
                var macdData = macd.Histogram.Last(i);

                if (lower > emaData)
                {
                    emaDatas[6 - i] = lower - emaData;
                }
                else if (lower <= emaData && emaData <= upper)
                {
                    emaDatas[6 - i] = 0;
                }
                else
                {
                    emaDatas[6 - i] = upper - emaData;
                }

                macdDatas[6 - i] = macdData;
            }



            if ((IsCurSeriesBreak(emaDatas) > 0 && Is5SeriesBreak(macdDatas) > 0) ||
                (IsCurSeriesBreak(macdDatas) > 0 && Is5SeriesBreak(emaDatas) > 0))
            {
                algo.Print(string.Join(",", emaDatas));
                algo.Print(string.Join(",", macdDatas));
                price      = ema.Result.Last(1) + algo.Symbol.PipSize * openPip;
                stopLoss   = ema.Result.Last(1) - algo.Symbol.PipSize * stopLossPip;
                takeProfit = price + (price - stopLoss);
                return(100);
            }

            if ((IsCurSeriesBreak(emaDatas) < 0 && Is5SeriesBreak(macdDatas) < 0) ||
                (IsCurSeriesBreak(macdDatas) < 0 && Is5SeriesBreak(emaDatas) < 0))
            {
                algo.Print(string.Join(",", emaDatas));
                algo.Print(string.Join(",", macdDatas));
                price      = ema.Result.Last(1) - algo.Symbol.PipSize * openPip;
                stopLoss   = ema.Result.Last(1) + algo.Symbol.PipSize * stopLossPip;
                takeProfit = price - (stopLoss - price);
                return(-100);
            }

            return(0);
        }
Ejemplo n.º 20
0
 protected override void Initialize()
 {
     MacdHistogram = Indicators.MacdHistogram(Source, LongCycle, ShortCycle, Periods);
 }
 protected override void Initialize()
 {
     macd = Indicators.MacdHistogram(shortCycle, longCycle, signalPeriod);
 }
 protected override void Initialize()
 {
     macd = Indicators.MacdHistogram(shortCycle, longCycle, signalPeriod);
 }
Ejemplo n.º 23
0
 protected override void OnStart()
 {
     _macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
 }
Ejemplo n.º 24
0
 protected override void OnStart()
 {
     macd=Indicators.MacdHistogram(SlowMA,FastMA,3);
 }
Ejemplo n.º 25
0
 protected override void OnStart()
 {
     _macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
 }
Ejemplo n.º 26
0
 protected override void OnStart()
 {
     macd = Indicators.MacdHistogram(SlowMA, FastMA, 3);
 }
Ejemplo n.º 27
0
        public MacdSeries(C1FlexChart chart, string plotAreaName) : base()
        {
            Chart = chart;
            Chart.BeginUpdate();

            AxisY.TitleStyle            = new ChartStyle();
            AxisY.TitleStyle.FontWeight = FontWeights.Bold;
            AxisY.Position       = C1.Chart.Position.Right;
            AxisY.PlotAreaName   = plotAreaName;
            AxisY.Title          = "MACD";
            AxisY.Labels         = false;
            AxisY.MajorTickMarks = AxisY.MinorTickMarks = C1.Chart.TickMark.None;


            Macd series = new Macd();

            series.MacdLineStyle = new ChartStyle();
            series.MacdLineStyle.StrokeThickness = 1;
            series.SignalLineStyle = new ChartStyle();
            series.SignalLineStyle.StrokeThickness = 1;
            series.ChartType             = C1.Chart.Finance.FinancialChartType.Line;
            series.Style                 = new C1.WPF.Chart.ChartStyle();
            series.Style.StrokeThickness = 1;
            series.BindingX              = "Date";
            series.Binding               = "High,Low,Close";

            series.AxisY = AxisY;
            Chart.Series.Add(series);



            MacdHistogram histogram = new MacdHistogram();

            histogram.Style = new C1.WPF.Chart.ChartStyle();
            histogram.Style.StrokeThickness = 1;
            histogram.BindingX = "Date";
            histogram.Binding  = "High,Low,Close";


            double[] values = null;
            ViewModel.ViewModel.Instance.PropertyChanged += (o, e) =>
            {
                if (e.PropertyName == "CurrectQuote")
                {
                    values = histogram.GetValues(0); // this is the value;
                }
            };

            histogram.SymbolRendering += (sender, ev) =>
            {
                if (values == null)
                {
                    values = histogram.GetValues(0); // this is the volume value;
                }
                if (values != null)
                {
                    if (values[ev.Index] > 0)
                    {
                        if (IncreasingBar is SolidColorBrush)
                        {
                            Color c  = (IncreasingBar as SolidColorBrush).Color;
                            Color cf = Color.FromArgb(128, c.R, c.G, c.B);
                            ev.Engine.SetStroke(c.ToArgb());
                            ev.Engine.SetFill(cf.ToArgb());
                        }
                    }
                    else
                    {
                        if (DecreasingBar is SolidColorBrush)
                        {
                            Color c  = (DecreasingBar as SolidColorBrush).Color;
                            Color cf = Color.FromArgb(128, c.R, c.G, c.B);
                            ev.Engine.SetStroke(c.ToArgb());
                            ev.Engine.SetFill(cf.ToArgb());
                        }
                    }
                }
            };

            histogram.AxisY = AxisY;
            Chart.Series.Add(histogram);



            Utilities.Helper.BindingSettingsParams(chart, series, typeof(Macd), "MACD",
                                                   new Data.PropertyParam[]
            {
                new Data.PropertyParam("FastPeriod", typeof(int)),
                new Data.PropertyParam("SlowPeriod", typeof(int)),
                new Data.PropertyParam("SmoothingPeriod", typeof(int)),
                new Data.PropertyParam("MacdLineStyle.Stroke", typeof(Brush), "Series"),
                new Data.PropertyParam("SignalLineStyle.Stroke", typeof(Brush), "Series"),
            },
                                                   () =>
            {
                this.OnSettingParamsChanged();
            }
                                                   );

            //Utilities.Helper.BindingSettingsParams(chart, histogram, typeof(MacdHistogram), "MACD",
            //    new Data.PropertyParam[]
            //    {
            //        new Data.PropertyParam("Style.Stroke", typeof(Brush), "Histogram"),
            //        new Data.PropertyParam("Style.Fill", typeof(Brush), "Histogram"),
            //    },
            //    () =>
            //    {
            //        this.OnSettingParamsChanged();
            //    }
            //);

            Utilities.Helper.BindingSettingsParams(chart, this, typeof(MacdSeries), "MACD",
                                                   new Data.PropertyParam[]
            {
                new Data.PropertyParam("IncreasingBar", typeof(Brush)),
                new Data.PropertyParam("DecreasingBar", typeof(Brush)),
            },
                                                   () =>
            {
                this.OnSettingParamsChanged();
            }
                                                   );

            //binding series color to axis title.
            Binding binding = new Binding("Stroke");

            binding.Source = series.MacdLineStyle;
            BindingOperations.SetBinding(AxisY.TitleStyle, ChartStyle.StrokeProperty, binding);

            Chart.EndUpdate();

            this.Series = new FinancialSeries[] { series, histogram };
        }
Ejemplo n.º 28
0
        protected override void Initialize()
        {

            _dixPowerDigits = Math.Pow(10, Symbol.Digits);

            i_MACD_Histogram = Indicators.MacdHistogram(MarketSeries.Close, Period_SlowEMA, Period_FastEMA, Period_MACD_SMA);
            i_MCAD_signal = Indicators.MacdHistogram(MarketSeries.Close, Period_SlowEMA, Period_FastEMA, Period_MACD_SMA);
            //	i_MA_Close = Indicators.SimpleMovingAverage(MarketSeries.Close, 1);
            i_Parabolic_SAR = Indicators.ParabolicSAR(Step_PrbSAR, 0.1);
            i_MA_Open = Indicators.SimpleMovingAverage(MarketSeries.Open, 1);
            i_EMAf = Indicators.ExponentialMovingAverage(MarketSeries.Close, Period_FastEMA);
        }
Ejemplo n.º 29
0
 protected override void OnStart()
 {
     i_MACD  = Indicators.MacdHistogram(MarketSeries.Close, (int)_MACD_Slow_EMA, (int)_MACD_Fast_EMA, (int)_MACD_Signal);
     i_CCI_0 = Indicators.CommodityChannelIndex((int)_CCI_Period);
     i_CCI_1 = Indicators.CommodityChannelIndex((int)_CCI_Period);
 }