Esempio n. 1
0
        /// <summary>
        /// Удалить индикатор
        /// </summary>
        /// <param name="indicator">индикатор</param>
        public void DeleteIndicator(IIndicatorCandle indicator)
        {
            try
            {
                ChartCandle.DeleteIndicator(indicator);

                indicator.Delete();

                if (_indicatorsCandles.Count == 1)
                {
                    _indicatorsCandles = null;
                }
                else
                {
                    _indicatorsCandles.Remove(indicator);
                }
                Save();
                ReloadContext();
            }
            catch (Exception error)
            {
                SendErrorMessage(error);
            }
        }