public ChartClusterMaster(string name, StartProgram startProgram, HorizontalVolume volume) { _name = name; _chart = new ChartClusterPainter(name, startProgram, volume); Load(); }
// service // сервис /// <summary> /// constructor /// конструктор /// </summary> /// <param name="name">name of the robot that owns the chart/имя робота, которому принадлежит чарт</param> /// <param name="startProgram">program that creates a class object/программа создающая объект класса</param> /// <param name="volume">volumes/объёмы</param> public ChartClusterPainter(string name, StartProgram startProgram, HorizontalVolume volume) { try { _volume = volume; _startProgram = startProgram; _colorKeeper = new ChartMasterColorKeeper(name); _colorKeeper.LogMessageEvent += SendLogMessage; CreateChart(); _chart.Text = name; _chart.AxisViewChanged += _chart_AxisViewChanged; // zoom event/событие изменения масштаба _chart.MouseLeave += _chart_MouseLeave; Thread painterThred = new Thread(PainterThreadArea); painterThred.IsBackground = true; painterThred.Name = name + "ChartPainterThread"; painterThred.Start(); } catch (Exception error) { SendLogMessage(error.ToString(), LogMessageType.Error); } }
public void Process(HorizontalVolume volume) { _cluster = volume; _chart.ProcessCluster(_cluster.VolumeClusterLines); }
/// <summary> /// constructor / /// конструктор /// </summary> /// <param name="name">bot name / имя робота</param> /// <param name="startProgram">class creating program / программа создающая класс</param> public BotTabCluster(string name, StartProgram startProgram) { TabName = name; _startProgram = startProgram; CandleConnector = new ConnectorCandles(name, _startProgram); CandleConnector.LastCandlesChangeEvent += Tab_LastCandlesChangeEvent; CandleConnector.SecuritySubscribeEvent += CandleConnector_SecuritySubscribeEvent; CandleConnector.LogMessageEvent += SendNewLogMessage; _horizontalVolume = new HorizontalVolume(name); _horizontalVolume.MaxSummClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MaxSummClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MaxBuyClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MaxBuyClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MaxSellClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MaxSellClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MaxDeltaClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MaxDeltaClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MinSummClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MinSummClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MinBuyClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MinBuyClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MinSellClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MinSellClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MinDeltaClusterChangeEvent += delegate(HorizontalVolumeCluster line) { MinDeltaClusterChangeEvent?.Invoke(line); }; _horizontalVolume.MaxSummLineChangeEvent += delegate(HorizontalVolumeLine line) { MaxSummLineChangeEvent?.Invoke(line); }; _horizontalVolume.MaxBuyLineChangeEvent += delegate(HorizontalVolumeLine line) { MaxBuyLineChangeEvent?.Invoke(line); }; _horizontalVolume.MaxSellLineChangeEvent += delegate(HorizontalVolumeLine line) { MaxSellLineChangeEvent?.Invoke(line); }; _horizontalVolume.MaxDeltaLineChangeEvent += delegate(HorizontalVolumeLine line) { MaxDeltaLineChangeEvent?.Invoke(line); }; _horizontalVolume.MinSummLineChangeEvent += delegate(HorizontalVolumeLine line) { MinSummLineChangeEvent?.Invoke(line); }; _horizontalVolume.MinBuyLineChangeEvent += delegate(HorizontalVolumeLine line) { MinBuyLineChangeEvent?.Invoke(line); }; _horizontalVolume.MinSellLineChangeEvent += delegate(HorizontalVolumeLine line) { MinSellLineChangeEvent?.Invoke(line); }; _horizontalVolume.MinDeltaLineChangeEvent += delegate(HorizontalVolumeLine line) { MinDeltaLineChangeEvent?.Invoke(line); }; _chartMaster = new ChartClusterMaster(name, startProgram, _horizontalVolume); _chartMaster.LogMessageEvent += SendNewLogMessage; }