/// <summary> /// прорисовать паттерн на его индивидуальном чарте /// </summary> private void PaintSinglePattern(IPattern pattern, ChartPainter chart) { if (chart.GetChart().InvokeRequired) { chart.GetChart().Invoke(new Action <IPattern, ChartPainter>(PaintSinglePattern), pattern, chart); return; } chart.ClearDataPointsAndSizeValue(); chart.ClearSeries(); if (pattern.Type == PatternType.Candle) { chart.PaintSingleCandlePattern(((PatternCandle)pattern).GetInCandle()); } if (pattern.Type == PatternType.Volume) { chart.PaintSingleVolumePattern(((PatternVolume)pattern).GetInCandle()); } if (pattern.Type == PatternType.Indicators) { PatternIndicators pat = (PatternIndicators)pattern; for (int i = 0; pat.Indicators != null && i < pat.Indicators.Count; i++) { if (chart.IndicatorIsCreate(pat.Indicators[i].Name + "0") == false) { chart.CreateSeries(chart.GetChartArea(pat.Indicators[i].NameArea), pat.Indicators[i].TypeIndicator, pat.Indicators[i].NameSeries + "0"); } chart.ProcessIndicator(pat.Indicators[i]); } } }