예제 #1
0
 internal XAxis(Pane owner)
     : base(owner)
 {
     Period = Period.Other;
     _majorLabels = new ArrayList();
     _minorLabels = new ArrayList();
     _grid = new ArrayList();
 }
예제 #2
0
 // Methods
 internal ExXAxis(Pane owner)
     : base(owner)
 {
     Period = Period.Other;
     _dates = new ArrayList();
     _majorLabels = new ArrayList();
     _minorLabels = new ArrayList();
     _grid = new ArrayList();
     _labelStrategy = new XAxisLabelStrategy();
 }
예제 #3
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     series = new LineSeries("price changes")
     {
         LineColor = ColorLine,
         ShiftX = Period + 1
     };
     SeriesResult = new List<Series.Series> { series };
     EntitleIndicator();
 }
예제 #4
0
 internal YAxis(Pane owner)
     : base(owner)
 {
     NumberDecimalDigitsAuto = true;
     MinAuto = true;
     MaxAuto = true;
     labelInfo = new YAxisLabelInfo();
     LeftAxisRect = new Rectangle(0, 0, 0, 0);
     RightAxisRect = new Rectangle(0, 0, 0, 0);
     exponentLabel = new ExponentLabel(this);
 }
예제 #5
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     seriesRatio = new LineSeries("E-Ratio")
     {
         LineColor = Color.Blue,
         ShiftX = 1,
         MarkerSpanPoints = 2,
         MinPixelsBetweenMarkers = 10
     };
     SeriesResult = new List<Series.Series> { seriesRatio };
     // инициализируем индикатор
     EntitleIndicator();
 }
예제 #6
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     // инициализируем индикатор
     seriesRSI = new LineSeries(Name)
     {
         LineColor = LineColor,
         Transparent = true,
         ShiftX = 1,
         DrawShadow = DrawShadow,
         ShadowWidth = ShadowWidth,
         ShadowColor = Color.Gray,
         ShadowAlpha = ShadowAlpha,
     };
     seriesBound = new RegionSeries(Localizer.GetString("TitleRSIBorders")) { DrawAsFrame = true };
     SeriesResult = new List<Series.Series> { seriesRSI, seriesBound };
     EntitleIndicator();
 }
예제 #7
0
 // Methods
 public PaneMoveEventArgs(Pane pane)
 {
     _pane = pane;
 }
예제 #8
0
 // Methods
 public PaneResizeEventArgs(Pane affectedPane, Pane adjacentPane)
 {
     _affectedPane = affectedPane;
     _adjacentPane = adjacentPane;
 }
예제 #9
0
 protected Axis(Pane owner)
 {
     Owner = owner;
 }
        private void CreateIndicatorPane(IChartIndicator indi)
        {
            // назначить индикатору панель
            if (!indi.CreateOwnPanel || ((BaseChartIndicator)indi).ownPane != null) return;

            var newPane = new Pane(indi.Name, chart);
            ((BaseChartIndicator)indi).ownPane = newPane;

            indi.DrawPane = newPane;
            foreach (var series in indi.SeriesResult)
                newPane.Series.Add(series);
            chart.Panes.Add(newPane);
        }
예제 #11
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     seriesMargins = new RegionSeries(Localizer.GetString("TitleExtremaBordes")) {CustomAlphaChannel = true};
     seriesExtr = new TrendLineSeries(Localizer.GetString("TitleExtrema"));
     SeriesResult = new List<Series.Series> { seriesMargins, seriesExtr };
     EntitleIndicator();
 }
예제 #12
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     // инициализируем индикатор
     seriesZigZag = new LineSeries(Localizer.GetString("TitleZigzag"))
     {
         Transparent = true,
         LineColor = lineColor,
         LineWidth = ((float)LineWidth),
         ShiftX = 1,
         DashPattern = new float[] { 3, 5 }
     };
     SeriesResult = new List<Series.Series> { seriesZigZag };
     EntitleIndicator();
 }
예제 #13
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     // инициализируем индикатор
     EntitleIndicator();
     series = new TrendLineSeries(Name);
     commentSeries = new SeriesAsteriks(Name);
     SeriesResult = new List<Series.Series> { series, commentSeries};
 }
예제 #14
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     SeriesResult = new List<Series.Series> { seriesTurnBar };
     EntitleIndicator();
 }
예제 #15
0
 protected Axis(Pane owner)
 {
     Owner = owner;
 }
예제 #16
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            seriesDeltas = new HistogramSeries("Accelerator");
            SeriesResult = new List<Series.Series> { seriesDeltas };

            EntitleIndicator();
        }
예제 #17
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     //? Обязательно ли эти строки писать тут, а не скажем в конструкторе?
     /* А
        Индикатор создается через reflection, было удобней отдельно сделать метод добавления на график
        Хотя и там можно было бы подсунуть эти параметры... надо посмотреть
      */
     owner = chart;
     SeriesResult = new List<Series.Series> { series };
     EntitleIndicator();
 }
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            // инициализируем индикатор
            SeriesResult = new List<Series.Series> { seriesBuy, seriesSell };
            EntitleIndicator();

            needRebuildLevels = true;
            owner.Owner.OnNewsReceived += OnNewsReceived;

            // показать уже существующие объемы
            List<News> lstNews = null;
            if (owner.Owner.getAllNewsByChannel != null)
                lstNews = owner.Owner.getAllNewsByChannel(channelId);

            if (lstNews != null)
                if (lstNews.Count > 0)
                    ProcessNews(lstNews.ToArray());
        }
예제 #19
0
 // Methods
 public PaneMoveEventArgs(Pane pane)
 {
     _pane = pane;
 }
예제 #20
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            // инициализируем индикатор
            MainLine = new LineSeries(Name + " Main")
            {
                LineColor = LineColor1,
                Transparent = true,
                ShiftX = 1,
                DrawShadow = DrawShadow,
                ShadowWidth = ShadowWidth,
                ShadowColor = Color.Gray,
                ShadowAlpha = ShadowAlpha,
            };
            SignalLine = new LineSeries(Name + " Signal")
            {
                LineColor = LineColor2,
                Transparent = true,
                ShiftX = 1,
                DrawShadow = DrawShadow,
                ShadowWidth = ShadowWidth,
                ShadowColor = Color.Gray,
                ShadowAlpha = ShadowAlpha,
            };
            FastEMALine = new SeriesData();
            SlowEMALine = new SeriesData();

            SeriesResult = new List<Series.Series> { MainLine, SignalLine};
            EntitleIndicator();
        }
예제 #21
0
 // Methods
 public PaneResizeEventArgs(Pane affectedPane, Pane adjacentPane)
 {
     _affectedPane = affectedPane;
     _adjacentPane = adjacentPane;
 }
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            // инициализируем индикатор
            SeriesResult = new List<Series.Series> { seriesVolume, seriesOI };
            EntitleIndicator();

            needRebuildLevels = true;
            owner.Owner.OnNewsReceived += OnNewsReceived;
            // показать уже существующие уровни
            List<News> lstNews;
            NewsStorage.Instance.ReadNews(channelId, out lstNews);
            if (lstNews != null)
                if (lstNews.Count > 0)
                    ProcessNews(lstNews.ToArray());
        }
예제 #23
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            seriesUp =
                new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleRandomWalkModelForecastShort"),
                                                  Localizer.GetString("TitleUpperLimitSmall")));
            seriesDown =
                new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleRandomWalkModelForecastShort"),
                                                  Localizer.GetString("TitleLowerLimitSmall")));
            SeriesResult = new List<Series.Series> { seriesUp, seriesDown };

            seriesUp.LineWidth = (float)lineWidth;
            seriesDown.LineWidth = (float)lineWidth;

            EntitleIndicator();
        }
예제 #24
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            tencan = new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleTenkanLineSmall")));
            kijyn = new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleKijunLineSmall")));
            senkouA = new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleSenkouALineSmall")));
            senkouB = new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleSenkouBLineSmall")));
            chikou = new TrendLineSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleChikouSmall")));
            cloud = new PolygonSeries(string.Format("{0} - {1}", Localizer.GetString("TitleIchimokuIndicator"), Localizer.GetString("TitleKumoSmall")))
                {
                    colorCloudA = ColorCloudA,
                    colorCloudB = ColorCloudB
                };

            SeriesResult = new List<Series.Series> { tencan, kijyn, senkouA, senkouB, chikou, cloud };
            EntitleIndicator();
        }
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     // инициализируем индикатор
     EntitleIndicator();
     seriesLine = new LineSeries(Name);
     SeriesResult = new List<Series.Series> { seriesLine };
     // цветовая схема
     ColorLine = IndicatorColorScheme.colorsLine[indicatorThemeIndex];
     ColorFill = IndicatorColorScheme.colorsFill[indicatorThemeIndex++];
     if (indicatorThemeIndex >= IndicatorColorScheme.PresetColorsCount)
         indicatorThemeIndex = 0;
 }
예제 #26
0
 public Pane Add(Pane pane)
 {
     return(Add(pane, (Pane)PositionList[PositionList.Count - 1],
                ((Pane)PositionList[PositionList.Count - 1]).PercentHeight));
 }
예제 #27
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     indSeriesRenco = new CandlestickSeries(Name) {DownFillColor = ColorBarDn, UpFillColor = ColorBarUp};
     SeriesResult = new List<Series.Series> { indSeriesRenco };
     EntitleIndicator();
 }
예제 #28
0
 public Pane Add(Pane pane, float percentHeight)
 {
     return(Add(pane, (Pane)PositionList[PositionList.Count - 1], percentHeight));
 }
예제 #29
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            // инициализируем индикатор
            mainLine = new TrendLineSeries(Name);

            SeriesResult = new List<Series.Series> { mainLine };
            EntitleIndicator();
        }
예제 #30
0
 public bool ContainsPane(Pane pane)
 {
     return(PositionList.Contains(pane));
 }
예제 #31
0
 internal PaneFrame(Pane owner)
 {
     Owner = owner;
 }
예제 #32
0
 internal void Layout()
 {
     if (PositionList.Count != 0)
     {
         NormalizePercentHeight();
         Rectangle clientRect = Chart.ClientRect;
         int       num        = clientRect.Height - (Chart.InterPaneGap * (PositionList.Count - 1));
         num -= Chart.InterPaneGap + XAxisPane.FixedHeight;
         if (num > 0)
         {
             Pane pane;
             int  minimumPaneHeight;
             Pane pane2 = null;
             bool flag  = false;
             for (int i = 0; i < PositionList.Count; i++)
             {
                 pane = (Pane)PositionList[i];
                 minimumPaneHeight = (int)Math.Round(((pane.PercentHeight * num) / 100f));
                 if (minimumPaneHeight < pane.MinimumPaneHeight)
                 {
                     pane.PercentHeight = ((pane.MinimumPaneHeight) / ((float)num)) * 100f;
                     flag = true;
                 }
             }
             if (flag)
             {
                 NormalizePercentHeight();
             }
             var list = new ArrayList();
             int num5 = -2147483648;
             int num6 = -1;
             int num3 = 0;
             for (int j = 0; j < PositionList.Count; j++)
             {
                 pane = (Pane)PositionList[j];
                 minimumPaneHeight = (int)Math.Round(((pane.PercentHeight * num) / 100f));
                 if (minimumPaneHeight < pane.MinimumPaneHeight)
                 {
                     minimumPaneHeight = pane.MinimumPaneHeight;
                 }
                 list.Add(minimumPaneHeight);
                 num3 += minimumPaneHeight;
                 if (minimumPaneHeight >= num5)
                 {
                     num5  = minimumPaneHeight;
                     num6  = list.Count - 1;
                     pane2 = pane;
                 }
             }
             if (num3 > num)
             {
                 list[num6] = ((int)list[num6]) - (num3 - num);
                 if (((int)list[num6]) < pane2.MinimumPaneHeight)
                 {
                     list[num6] = pane2.MinimumPaneHeight;
                 }
             }
             if (num3 < num)
             {
                 list[list.Count - 1] = ((int)list[list.Count - 1]) + (num - num3);
             }
             int y = 0;
             num3 = 0;
             for (int k = 0; k < PositionList.Count; k++)
             {
                 pane          = (Pane)PositionList[k];
                 pane.Location = new Point(0, y);
                 pane.Size     = new Size(clientRect.Width, (int)list[k]);
                 y            += ((int)list[k]) + Chart.InterPaneGap;
                 num3         += (int)list[k];
             }
             XAxisPane.Location = new Point(0, y);
             XAxisPane.Size     = new Size(clientRect.Width, XAxisPane.FixedHeight);
             Chart.Invalidate();
         }
     }
 }
예제 #33
0
 // Methods
 internal SeriesCollection(Pane owner)
 {
     _owner = owner;
 }
예제 #34
0
 public void Remove(Pane pane)
 {
     List.Remove(pane);
     PositionList.Remove(pane);
     Chart.PerformLayout();
 }
예제 #35
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     // инициализируем индикатор
     spans = new ProjectionSeries(Localizer.GetString("TitleProjections"));
     SeriesResult = new List<Series.Series> { spans };
     EntitleIndicator();
 }
예제 #36
0
        public void Add(ChartControl chart, Pane ownerPane)
        {
            owner = chart;
            SeriesResult = new List<Series.Series> { seriesLine, seriesDeltas };

            seriesLine.LineColor = clLine;
            seriesLine.LineWidth = (float)lineWidth;
            seriesLine.LineDashStyle = lineStyle;

            EntitleIndicator();
        }
예제 #37
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     SeriesResult = new List<Series.Series> { /*seriesComment*/ };
     EntitleIndicator();
 }
예제 #38
0
 public void Add(ChartControl chart, Pane ownerPane)
 {
     owner = chart;
     seriesK = new LineSeries("Stochastic")
     {
         LineColor = colorLineK,
         ShiftX = 1,
         Transparent = true
     };
     seriesD = new LineSeries("Stochastic MA")
     {
         LineColor = colorLineD,
         ShiftX = 1,
         LineDashStyle = DashStyle.Dot,
         Transparent = true
     };
     seriesBounds = new PartSeries("Stochastic Bounds") { LineStyle = LineStyle.Dot };
     SeriesResult = new List<Series.Series> { seriesK, seriesD, seriesBounds };
     EntitleIndicator();
 }