Пример #1
0
        void BtnCloseSelected_Click(object sender, EventArgs e)
        {
            List <object> Values = TdgvDeals.GetSelectedRowsValues(ThreadedDataGridView.Tags.Key);

            if (Values == null ? false : Values.Count <= 0)
            {
                return;
            }

            foreach (object obj in Values)
            {
                Manager.ForexTrading.DealClose(obj.ToString(), int.MaxValue, 1000);
            }
        }
Пример #2
0
        void BtnClosePosition_Click(object sender, EventArgs e)
        {
            List <object> Values = TdgvDeals.GetSelectedRowsValues(ThreadedDataGridView.Tags.Product);

            if (Values == null ? false : Values.Count <= 0)
            {
                return;
            }

            Values = Values.Distinct().ToList();

            foreach (object obj in Values)
            {
                DealRequest DRequest = new DealRequest(1000);
                DRequest.Product       = obj.ToString();
                DRequest.ClosePosition = true;
                Manager.ForexTrading.Save(DRequest);
            }
        }