Exemple #1
0
        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 eODPositionSnapshotToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool res = OrderClient.insertOrderEOD();

            if (res)
            {
                MessageBox.Show("EOD Snapshot Done");
            }
            else
            {
                MessageBox.Show("EOD Snapshot Error");
            }
        }
Exemple #3
0
        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);
        }