Exemple #1
0
        void ChartControl_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
        {
            if (!_fDragging)
            {
                return;
            }

            _iBarEnd = BarFromX((int)e.GetPosition(ChartPanel).X);

            if (!High.IsValidDataPoint(_iBarEnd) || !Low.IsValidDataPoint(_iBarEnd))
            {
                return;
            }

            if (_fDrawAB)
            {
                _priceEnd = swingDir > 0 ? High[_iBarEnd] : Low[_iBarEnd];
                lineAB    = UDrawLine("dDwABLine");
            }
            else
            {
                _priceEnd = swingDir < 0 ? High[_iBarEnd] : Low[_iBarEnd];
                lineBC    = UDrawLine("dDwBCLine");
            }

            ChartControl.InvalidateVisual();
        }