Пример #1
0
        private void ButtonSellLimit_Click(object sender, RoutedEventArgs e)
        {
            decimal volume;

            try
            {
                volume = TextBoxVolumeFast.Text.ToDecimal();
            }
            catch (Exception)
            {
                MessageBox.Show(OsLocalization.Trader.Label49);
                return;
            }

            decimal price;

            try
            {
                price = TextBoxPrice.Text.ToDecimal();
            }
            catch (Exception)
            {
                MessageBox.Show(OsLocalization.Trader.Label50);
                return;
            }

            if (price == 0)
            {
                MessageBox.Show(OsLocalization.Trader.Label50);
                return;
            }

            _strategyKeeper.BotSellLimit(volume, price);
        }
Пример #2
0
        private void ButtonSellLimit_Click(object sender, RoutedEventArgs e)
        {
            int volume;

            try
            {
                volume = Convert.ToInt32(TextBoxVolumeFast.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("В графе объём не правильное значение");
                return;
            }

            decimal price;

            try
            {
                price = Convert.ToDecimal(TextBoxPrice.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("В графе цена не правильное значение");
                return;
            }

            if (price == 0)
            {
                MessageBox.Show("В графе цена не правильное значение");
                return;
            }

            _strategyKeeper.BotSellLimit(volume, price);
        }
Пример #3
0
        private void ButtonSellLimit_Click(object sender, RoutedEventArgs e)
        {
            decimal volume;

            try
            {
                volume = Convert.ToDecimal(TextBoxVolumeFast.Text.Replace(",",
                                                                          CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator),
                                           CultureInfo.InvariantCulture);
            }
            catch (Exception)
            {
                MessageBox.Show(OsLocalization.Trader.Label49);
                return;
            }

            decimal price;

            try
            {
                price = Convert.ToDecimal(TextBoxPrice.Text.Replace(",",
                                                                    CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator),
                                          CultureInfo.InvariantCulture);
            }
            catch (Exception)
            {
                MessageBox.Show(OsLocalization.Trader.Label50);
                return;
            }

            if (price == 0)
            {
                MessageBox.Show(OsLocalization.Trader.Label50);
                return;
            }

            _strategyKeeper.BotSellLimit(volume, price);
        }