private void btnFuturesSell_Click(object sender, EventArgs e) { string symbol = cmbFuturesSymbol.SelectedItem.ToString(); DateTime oExpiryDate = DateTime.ParseExact(cmbFuturesExpiry.SelectedItem.ToString(), "yyyy-MM-dd", null); string expiry = oExpiryDate.ToString("yyyyMMdd"); double price = Convert.ToDouble(txtFuturesLimit.Text); int qty = Convert.ToInt32(txtFuturesQty.Text); char action = 'S'; OrderClient.insertOrder(symbol, expiry, "", "NFO", "0", price, qty, action, this); }
private void btnSell_Click(object sender, EventArgs e) { string symbol = cmbOptionsSymbol.SelectedItem.ToString(); DateTime oExpiryDate = DateTime.ParseExact(cmbFuturesExpiry.SelectedItem.ToString(), "dd-MM-yyyy", null); string expiry = oExpiryDate.ToString("yyyyMMdd"); string callput = cmbOptionsCallPut.SelectedItem.ToString(); string strike = cmbOptionsStrike.SelectedItem.ToString(); double price = Convert.ToDouble(txtOptionsPrice.Text); int qty = Convert.ToInt32(txtOptionsQty.Text); char action = 'S'; OrderClient.insertOrder(symbol, expiry, callput, "NOP", strike, price, qty, action, this); }