public StochasticTradeUi(StochasticTrade strategy) { InitializeComponent(); _strategy = strategy; TextBoxVolumeOne.Text = _strategy.VolumeFix.ToString(); TextBoxSlipage.Text = _strategy.Slipage.ToString(new CultureInfo("ru-RU")); ComboBoxRegime.Items.Add(BotTradeRegime.Off); ComboBoxRegime.Items.Add(BotTradeRegime.On); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyClosePosition); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyLong); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyShort); ComboBoxRegime.SelectedItem = _strategy.Regime; StochUp.Text = _strategy.Upline.Value.ToString(new CultureInfo("ru-RU")); StochDown.Text = _strategy.Downline.Value.ToString(new CultureInfo("ru-RU")); LabelRegime.Content = OsLocalization.Trader.Label115; LabelVolume.Content = OsLocalization.Trader.Label30; LabelSlippage.Content = OsLocalization.Trader.Label92; ButtonAccept.Content = OsLocalization.Trader.Label132; LabelStohasticUp.Content = OsLocalization.Trader.Label149; LabelStochasticLow.Content = OsLocalization.Trader.Label150; }
public StochasticTradeUi(StochasticTrade strategy) { InitializeComponent(); _strategy = strategy; TextBoxVolumeOne.Text = _strategy.VolumeFix.ToString(); TextBoxSlipage.Text = _strategy.Slipage.ToString(new CultureInfo("ru-RU")); ComboBoxRegime.Items.Add(BotTradeRegime.Off); ComboBoxRegime.Items.Add(BotTradeRegime.On); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyClosePosition); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyLong); ComboBoxRegime.Items.Add(BotTradeRegime.OnlyShort); ComboBoxRegime.SelectedItem = _strategy.Regime; StochUp.Text = _strategy.Upline.Value.ToString(new CultureInfo("ru-RU")); StochDown.Text = _strategy.Downline.Value.ToString(new CultureInfo("ru-RU")); }