private void StartJob() { string timeSpan = ""; string actionID = DateTime.Now.ToString("HHmm"); _Listener listen = new _Listener(); timeSpan = this.Cb_TimeSpan.SelectedItem.ToString(); if (timeSpan == "") { MessageBox.Show("None TimeSpan"); return; } listen.TimeSpan = timeSpan; listen.actionID = actionID; listen.offset = 0.01 * Convert.ToDouble(this.Txt_offset.Text.Trim()); listen.offset_close = 0.01 * Convert.ToDouble(this.Txt_offset_c.Text.Trim()); listen.stop_profit = 0.01 * Convert.ToDouble(this.Txt_StopProfit.Text.Trim()); listen.stop_lose = 0.01 * Convert.ToDouble(this.Txt_StopLose.Text.Trim()); try { listen.Listen(); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } //listen.ReturnResult(); this.Btn_Start.Enabled = true; this.Txt_ActionID.Text = actionID; MessageBox.Show("Done"); }
private void Start510050Core() { string actionID = Guid.NewGuid().ToString(); _Listener listen = new _Listener(); listen.actionID = actionID; //listen.offset_start = 0.01 * Convert.ToDouble(this.Txt_offset.Text.Trim()); //listen.offset_close = 0.01 * Convert.ToDouble(this.Txt_offset_c.Text.Trim()); listen.stop_profit = 0.01 * Convert.ToDouble(this.Txt_StopProfit.Text.Trim()); listen.stop_lose = 0.01 * Convert.ToDouble(this.Txt_StopLose.Text.Trim()); listen.MA_Type = this.CB_MA_STOCK.SelectedItem.ToString(); //listen.isTrailingStop = this.CheckBox_TrailingStopProfit.Checked; try { listen.Listen(); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } }