Beispiel #1
0
        private void processStopOrder(Stoporder stopOrder)
        {
            DataRow_stopOrder row = (DataRow_stopOrder)DTS.t_my_ClosingPositions.FindByID(stopOrder.transactionid);

            if (row != null)
            {
                DTS.t_my_ClosingPositions.Remove_Row(row);
            }
            DTS.t_my_ClosingPositions.AcceptChanges();
            DTS.t_my_ClosingPositions.Add_Row(stopOrder.seccode, stopOrder.buysell, stopOrder.stoploss.activationprice, stopOrder.takeprofit.activationprice, stopOrder.status, stopOrder.transactionid);
            DTS.t_my_ClosingPositions.AcceptChanges();
        }
Beispiel #2
0
        //--------------------------------------------------------------------------------
        public DataRow_stopOrder Add_Row(string security_code, string buysell, double stopLoss, double takeProfit, string status, int transactionId)
        {
            DataRow_stopOrder row = (DataRow_stopOrder)NewRow();

            object[] aValues = new object[]
            {
                security_code, buysell, stopLoss, takeProfit, status, transactionId
            };
            row.ItemArray = aValues;
            Rows.Add(row);
            return(row);
        }
Beispiel #3
0
 //--------------------------------------------------------------------------------
 public void Remove_Row(DataRow_stopOrder row)
 {
     Rows.Remove(row);
 }
Beispiel #4
0
 //--------------------------------------------------------------------------------
 public void Add_Row(DataRow_stopOrder row)
 {
     Rows.Add(row);
 }