示例#1
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                Period1 = CreateParameterInt("Period 1", 5);
                Period2 = CreateParameterInt("Period 2", 3);
                Period3 = CreateParameterInt("Period 3", 3);
                Period4 = CreateParameterInt("Period 4", 3);

                SeriesOne = CreateSeries("Stochastic", Color.BlueViolet, IndicatorChartPaintType.Line, true);
                SeriesTwo = CreateSeries("Stochastic Signal Line", Color.Green, IndicatorChartPaintType.Line, true);
            }
            else if (state == IndicatorState.Dispose)
            {
                if (_dm != null)
                {
                    _dm.Clear(); _dm     = null;
                    _diff.Clear(); _diff = null;

                    _dms.Clear(); _dms   = null;
                    _dms2.Clear(); _dms2 = null;

                    _diffS.Clear(); _diffS   = null;
                    _diffS2.Clear(); _diffS2 = null;
                }
            }
        }
示例#2
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                Period1 = CreateParameterInt("Period 1", 5);
                Period2 = CreateParameterInt("Period 2", 3);
                Period3 = CreateParameterInt("Period 3", 3);

                SeriesOne = CreateSeries("K value", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
                SeriesTwo = CreateSeries("K average", Color.DarkRed, IndicatorChartPaintType.Line, true);
            }
            else if (state == IndicatorState.Dispose)
            {
                if (_t1 != null)
                {
                    _t1.Clear(); _t1 = null;
                    _t2.Clear(); _t2 = null;

                    _tM1.Clear(); _tM1 = null;
                    _tM2.Clear(); _tM2 = null;

                    _k.Clear(); _k   = null;
                    _kM.Clear(); _kM = null;
                }
            }
        }
示例#3
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lengthJaw   = CreateParameterInt("Jaw length", 13);
                _lengthLips  = CreateParameterInt("Lips length", 8);
                _lengthTeeth = CreateParameterInt("Teeth length", 5);

                _shiftJaw   = CreateParameterInt("Jaw offset", 8);
                _shiftLips  = CreateParameterInt("Lips offset", 3);
                _shiftTeeth = CreateParameterInt("Teeth offset", 5);

                _seriesJaw   = CreateSeries("Jaw", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
                _seriesTeeth = CreateSeries("Teeth", Color.DarkRed, IndicatorChartPaintType.Line, true);
                _seriesLips  = CreateSeries("Lips", Color.LawnGreen, IndicatorChartPaintType.Line, true);

                _smaJaw = IndicatorsFactory.CreateIndicatorByName("Ssma", Name + "SsmaJaw", false);
                ((IndicatorParameterInt)_smaJaw.Parameters[0]).Bind(_lengthJaw);
                ProcessIndicator("Jaw SSMA", _smaJaw);

                _smaLips = IndicatorsFactory.CreateIndicatorByName("Ssma", Name + "SsmaLips", false);
                ((IndicatorParameterInt)_smaLips.Parameters[0]).Bind(_lengthLips);
                ProcessIndicator("Lips SSMA", _smaLips);

                _smaTeeth = IndicatorsFactory.CreateIndicatorByName("Ssma", Name + "SsmaTeeth", false);
                ((IndicatorParameterInt)_smaTeeth.Parameters[0]).Bind(_lengthTeeth);
                ProcessIndicator("Teeth SSMA", _smaTeeth);
            }
        }
示例#4
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _series = CreateSeries("MFI", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
         _period = CreateParameterInt("Period", 3);
     }
 }
示例#5
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _lenght = CreateParameterInt("Length", 14);
         _series = CreateSeries("ER", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
     }
 }
示例#6
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _period = CreateParameterInt("Period", 14);
         _series = CreateSeries("Cmo", Color.Orange, IndicatorChartPaintType.Line, true);
     }
 }
示例#7
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         lenght1 = CreateParameterInt("Lenght 1", 20);
         lenght2 = CreateParameterInt("Lenght 2", 10);
         series1 = CreateSeries("VO", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
     }
 }
示例#8
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _period      = CreateParameterInt("Period", 20);
         _candlePoint = CreateParameterStringCollection("Candle point", "Close", Entity.CandlePointsArray);
         _series      = CreateSeries("StdDev", Color.Green, IndicatorChartPaintType.Line, true);
     }
 }
示例#9
0
        public override void OnStateChange(IndicatorState state)
        {
            _period       = CreateParameterInt("Length", 14);
            _seriesZigZag = CreateSeries("ZigZag", Color.CornflowerBlue, IndicatorChartPaintType.Point, false);
            _seriesZigZag.CanReBuildHistoricalValues = true;

            _seriesToLine = CreateSeries("ZigZagLine", Color.CornflowerBlue, IndicatorChartPaintType.Point, true);
            _seriesToLine.CanReBuildHistoricalValues = true;
        }
示例#10
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _length      = CreateParameterInt("Length", 5);
         _candlePoint = CreateParameterStringCollection("Candle point", "Close", Entity.CandlePointsArray);
         _series      = CreateSeries("Momentum", Color.Aqua, IndicatorChartPaintType.Line, true);
     }
 }
示例#11
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _lenght      = CreateParameterInt("Length", 20);
         _candlePoint = CreateParameterStringCollection("Candle Point", "Typical", Entity.CandlePointsArray);
         _series      = CreateSeries("Cci", Color.CadetBlue, IndicatorChartPaintType.Line, true);
     }
 }
示例#12
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _lenght     = CreateParameterInt("Length", 5);
         _seriesUp   = CreateSeries("SeriesUp", Color.Blue, IndicatorChartPaintType.Point, true);
         _seriesDown = CreateSeries("SeriesDown", Color.DarkRed, IndicatorChartPaintType.Point, true);
     }
 }
示例#13
0
文件: FBD.cs 项目: w1r2p1/OsEngine-1
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lookUp   = CreateParameterInt("Look Up", 10);
                _lookBack = CreateParameterInt("Look Back", 10);

                _series = CreateSeries("FBD value", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
            }
        }
示例#14
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         period1 = CreateParameterInt("Period 1", 7);
         period2 = CreateParameterInt("Period 2", 14);
         period3 = CreateParameterInt("Period 3", 28);
         series1 = CreateSeries("UO", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
     }
 }
示例#15
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _first   = CreateParameterInt("Tenkan", 9);
                _second  = CreateParameterInt("Kijun", 26);
                _fird    = CreateParameterInt("Sencou", 52);
                _sdvig   = CreateParameterInt("Chinkou", 26);
                _chinkou = CreateParameterInt("Deviation", 26);


                _seriesEtalon = CreateSeries("Tenkan", Color.BlueViolet, IndicatorChartPaintType.Line, true);
                _seriesEtalon.CanReBuildHistoricalValues = false;

                _seriesRoundet = CreateSeries("Kijun", Color.OrangeRed, IndicatorChartPaintType.Line, true);
                _seriesRoundet.CanReBuildHistoricalValues = false;

                _seriesLate = CreateSeries("Chinkou", Color.DarkRed, IndicatorChartPaintType.Point, true);
                _seriesLate.CanReBuildHistoricalValues = true;

                _seriesFirst = CreateSeries("Sencou A", Color.LimeGreen, IndicatorChartPaintType.Line, true);
                _seriesFirst.CanReBuildHistoricalValues = false;

                _seriesSecond = CreateSeries("Sencou B", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
                _seriesSecond.CanReBuildHistoricalValues = false;
            }
            else if (state == IndicatorState.Dispose)
            {
                if (_valuesEtalonLine_Kejun_sen != null)
                {
                    _valuesEtalonLine_Kejun_sen.Clear();
                }

                if (_valuesLineRounded_Teken_sen != null)
                {
                    _valuesLineRounded_Teken_sen.Clear();
                }

                if (_valuesLineLate_Chinkou_span != null)
                {
                    _valuesLineLate_Chinkou_span.Clear();
                }

                if (_valuesLineFirst_Senkkou_span_A != null)
                {
                    _valuesLineFirst_Senkkou_span_A.Clear();
                }

                if (_valuesLineSecond_Senkou_span_B != null)
                {
                    _valuesLineSecond_Senkou_span_B.Clear();
                }
            }
        }
示例#16
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _period      = CreateParameterInt("Period", 14);
                _candlePoint = CreateParameterStringCollection("Candle Point", "Close", Entity.CandlePointsArray);

                _seriesRegressionLine = CreateSeries("Regression Line ", Color.HotPink,
                                                     IndicatorChartPaintType.Line, true);
            }
        }
示例#17
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lenghtUp   = CreateParameterInt("Length up", 21);
                _lenghtDown = CreateParameterInt("Lenght down", 21);

                _seriesUp   = CreateSeries("Up line", Color.Aqua, IndicatorChartPaintType.Line, true);
                _seriesDown = CreateSeries("Down line", Color.BlueViolet, IndicatorChartPaintType.Line, true);
            }
        }
示例#18
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _period = CreateParameterInt("Period", 14);

                _seriesLine = CreateSeries("EaseOfMovement", Color.Aqua, IndicatorChartPaintType.Line, true);
                _seriesLine.CanReBuildHistoricalValues = false;

                _seriesEomRaw = CreateSeries("Eom Raw", Color.Red, IndicatorChartPaintType.Line, false);
            }
        }
示例#19
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _length = CreateParameterInt("Period", 13);

                _series = CreateSeries("Values", Color.LimeGreen, IndicatorChartPaintType.Column, true);

                _sma = IndicatorsFactory.CreateIndicatorByName("Sma", Name + "Sma", false);
                ((IndicatorParameterInt)_sma.Parameters[0]).Bind(_length);
                ProcessIndicator("Sma", _sma);
            }
        }
示例#20
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lenght = CreateParameterInt("Length", 5);

                _seriesUp   = CreateSeries("SeriesUp", Color.DarkRed, IndicatorChartPaintType.Point, true);
                _seriesDown = CreateSeries("SeriesDown", Color.DarkGreen, IndicatorChartPaintType.Point, true);

                _fractial = IndicatorsFactory.CreateIndicatorByName("Fractail_lenth", Name + "Fractail", false);
                ((IndicatorParameterInt)_fractial.Parameters[0]).Bind(_lenght);
                ProcessIndicator("Fractail", _fractial);
            }
        }
示例#21
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lenght    = CreateParameterInt("Length", 21);
                _deviation = CreateParameterDecimal("Deviation", 2);

                _seriesUp     = CreateSeries("Up line", Color.Green, IndicatorChartPaintType.Line, true);
                _seriesCenter = CreateSeries("Centre line", Color.Green, IndicatorChartPaintType.Line, false);
                _seriesDown   = CreateSeries("Down line", Color.Green, IndicatorChartPaintType.Line, true);

                _sma = IndicatorsFactory.CreateIndicatorByName("Sma", Name + "Sma", false);
                ((IndicatorParameterInt)_sma.Parameters[0]).Bind(_lenght);
                ProcessIndicator("Central SMA", _sma);
            }
        }
示例#22
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _shortPeriod = CreateParameterInt("Short Period", 3);

                _longPeriod = CreateParameterInt("Long Period", 10);

                _seriesLine = CreateSeries("Chaikin Oscillator", Color.Gold, IndicatorChartPaintType.Line, true);
                _seriesLine.CanReBuildHistoricalValues = false;

                _seriesVi = CreateSeries("Series Vi", Color.AliceBlue, IndicatorChartPaintType.Line, false);
                _seriesVi.CanReBuildHistoricalValues = false;

                _seriesAccDistr = CreateSeries("Series Acc Distr", Color.Red, IndicatorChartPaintType.Line, false);
                _seriesAccDistr.CanReBuildHistoricalValues = false;
            }
        }
示例#23
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                lengthFractal     = CreateParameterInt("Length Fractal", 5);
                seriesUpFractal   = CreateSeries("UpFractal", Color.Aqua, IndicatorChartPaintType.Point, true);
                seriesDownFractal = CreateSeries("DownFractal", Color.Aqua, IndicatorChartPaintType.Point, true);
                if (lengthFractal.ValueInt % 2 == 0)
                {
                    lengthFractal.ValueInt++;
                }
                halfLengthFractal = lengthFractal.ValueInt / 2;
            }
            //else if(state == IndicatorState.Dispose)
            //{

            //}
        }
示例#24
0
 public override void OnStateChange(IndicatorState state)
 {
     if (state == IndicatorState.Configure)
     {
         _lenght = CreateParameterInt("Lenght", 14);
         _series = CreateSeries("Atr value", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
     }
     else if (state == IndicatorState.Dispose)
     {
         if (_moving != null)
         {
             _moving.Clear();
         }
         if (_trueRange != null)
         {
             _trueRange.Clear();
         }
     }
 }
示例#25
0
文件: RVI.cs 项目: w1r2p1/OsEngine-1
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _p1 = CreateParameterInt("Period", 5);

                _seriesOne = CreateSeries("Value 1", Color.DarkRed, IndicatorChartPaintType.Line, true);
                _seriesTwo = CreateSeries("Value 2", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
            }
            else if (state == IndicatorState.Dispose)
            {
                if (_moveAverage != null)
                {
                    _moveAverage  = null;
                    _rangeAverage = null;
                    _rvi          = null;
                }
            }
        }
示例#26
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _shortPeriod = CreateParameterInt("Short Period", 3);

                _longPeriod = CreateParameterInt("Long Period", 10);

                _seriesLine = CreateSeries("Chaikin Oscillator", Color.Gold, IndicatorChartPaintType.Line, true);
                _seriesLine.CanReBuildHistoricalValues = false;

                _seriesShort = IndicatorsFactory.CreateIndicatorByName("Sma", Name + "Short", false);
                ((IndicatorParameterInt)_seriesShort.Parameters[0]).Bind(_shortPeriod);
                ProcessIndicator("Short Period", _seriesShort);

                _seriesLong = IndicatorsFactory.CreateIndicatorByName("Sma", Name + "Long", false);
                ((IndicatorParameterInt)_seriesLong.Parameters[0]).Bind(_longPeriod);
                ProcessIndicator("Short Period", _seriesLong);
            }
        }
示例#27
0
文件: AO.cs 项目: w1r2p1/OsEngine-1
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lenghtFastLine = CreateParameterInt("Fast line length", 5);
                _lenghtSlowLine = CreateParameterInt("Slow line length", 32);
                _candlePoint    = CreateParameterStringCollection("Candle point", "Typical", Entity.CandlePointsArray);

                _series = CreateSeries("AO", Color.DarkGreen, IndicatorChartPaintType.Column, true);

                _emaFast = IndicatorsFactory.CreateIndicatorByName("Ema", Name + "Ema fast", false);
                ((IndicatorParameterInt)_emaFast.Parameters[0]).Bind(_lenghtFastLine);
                ((IndicatorParameterString)_emaFast.Parameters[1]).Bind(_candlePoint);
                ProcessIndicator("Ema fast", _emaFast);

                _emaSlow = IndicatorsFactory.CreateIndicatorByName("Ema", Name + "Ema slow", false);
                ((IndicatorParameterInt)_emaSlow.Parameters[0]).Bind(_lenghtSlowLine);
                ((IndicatorParameterString)_emaSlow.Parameters[1]).Bind(_candlePoint);
                ProcessIndicator("Ema slow", _emaSlow);
            }
        }
示例#28
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _lenghtFastLine   = CreateParameterInt("Fast line length", 12);
                _lenghtSlowLine   = CreateParameterInt("Slow line length", 26);
                _lenghtSignalLine = CreateParameterInt("Signal line length", 9);

                _seriesMacd           = CreateSeries("MACD", Color.DarkGreen, IndicatorChartPaintType.Line, true);
                _seriesSignalLine     = CreateSeries("Signal line", Color.DarkRed, IndicatorChartPaintType.Line, true);
                _seriesMacdHistogramm = CreateSeries("MACD Histogramm", Color.DodgerBlue, IndicatorChartPaintType.Column, false);

                _emaFast = IndicatorsFactory.CreateIndicatorByName("Ema", Name + "Ema fast", false);
                ((IndicatorParameterInt)_emaFast.Parameters[0]).Bind(_lenghtFastLine);
                ProcessIndicator("Ema fast", _emaFast);

                _emaSlow = IndicatorsFactory.CreateIndicatorByName("Ema", Name + "Ema slow", false);
                ((IndicatorParameterInt)_emaSlow.Parameters[0]).Bind(_lenghtSlowLine);
                ProcessIndicator("Ema slow", _emaSlow);
            }
        }
示例#29
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _length = CreateParameterInt("Length", 14);

                _series = CreateSeries("ADX", Color.DodgerBlue, IndicatorChartPaintType.Line, true);
            }
            else if (state == IndicatorState.Dispose)
            {
                _dmjPlus          = null;
                _dmjPlusAverage   = null;
                _dmjMinus         = null;
                _dmjMinusAverage  = null;
                _trueRange        = null;
                _trueRangeAverage = null;
                _sDIjPlus         = null;
                _sDIjMinus        = null;
                _dX  = null;
                _adX = null;
            }
        }
示例#30
0
        public override void OnStateChange(IndicatorState state)
        {
            if (state == IndicatorState.Configure)
            {
                _period      = CreateParameterInt("Lenght", 100);
                _candlePoint = CreateParameterStringCollection("Candle Point", "Close", Entity.CandlePointsArray);

                _upDeviation   = CreateParameterDecimal("Up channel deviation", 2);
                _downDeviation = CreateParameterDecimal("Down channel deviation", -2);

                _seriesUpperband = CreateSeries("Up channel", Color.Aqua,
                                                IndicatorChartPaintType.Line, true);
                _seriesUpperband.CanReBuildHistoricalValues = true;

                _seriesCentralLine = CreateSeries("Regression Line ", Color.Gold,
                                                  IndicatorChartPaintType.Line, true);
                _seriesCentralLine.CanReBuildHistoricalValues = true;

                _seriesLowerband = CreateSeries("Down channel", Color.OrangeRed,
                                                IndicatorChartPaintType.Line, true);
                _seriesLowerband.CanReBuildHistoricalValues = true;
            }
        }