Beispiel #1
0
 public void AddFortsPositionInfo(string data)
 {
   TransaqFortsPosition tfp = new TransaqFortsPosition(data);
   lock (this.lockerFortsPosition)
   {
     if (!this.FortsPosition.ContainsKey(tfp.Client))
     {
       this.FortsPosition.Add(tfp.Client, new Dictionary<string, TransaqFortsPosition>());
       this.FortsPosition[tfp.Client].Add(tfp.SecCode, tfp);
     }
     else if (!this.FortsPosition[tfp.Client].ContainsKey(tfp.SecCode))
       this.FortsPosition[tfp.Client].Add(tfp.SecCode, tfp);
     else
       this.FortsPosition[tfp.Client][tfp.SecCode].Update(tfp);
   }
 }
Beispiel #2
0
        public void AddFortsPositionInfo(string data)
        {
            TransaqFortsPosition tfp = new TransaqFortsPosition(data);

            lock (this.lockerFortsPosition)
            {
                if (!this.FortsPosition.ContainsKey(tfp.Client))
                {
                    this.FortsPosition.Add(tfp.Client, new Dictionary <string, TransaqFortsPosition>());
                    this.FortsPosition[tfp.Client].Add(tfp.SecCode, tfp);
                }
                else if (!this.FortsPosition[tfp.Client].ContainsKey(tfp.SecCode))
                {
                    this.FortsPosition[tfp.Client].Add(tfp.SecCode, tfp);
                }
                else
                {
                    this.FortsPosition[tfp.Client][tfp.SecCode].Update(tfp);
                }
            }
        }
Beispiel #3
0
 public void Update(TransaqFortsPosition tfp)
 {
   if (tfp.SecId != -1)
     this.SecId = tfp.SecId;
   if (tfp.Client != string.Empty)
     this.Client = tfp.Client;
   if (tfp.StartNet != string.Empty)
     this.StartNet = tfp.StartNet;
   if (tfp.OpenBuys != string.Empty)
     this.OpenBuys = tfp.OpenBuys;
   if (tfp.OpenSells != string.Empty)
     this.OpenSells = tfp.OpenSells;
   if (tfp.TotalNet != double.MaxValue)
     this.TotalNet = tfp.TotalNet;
   if (tfp.TodayBuy != string.Empty)
     this.TodayBuy = tfp.TodayBuy;
   if (tfp.TodaySell != string.Empty)
     this.TodaySell = tfp.TodaySell;
   if (tfp.OptMargin != string.Empty)
     this.OptMargin = tfp.OptMargin;
   if (tfp.VarMargin != string.Empty)
     this.VarMargin = tfp.VarMargin;
   if (tfp.ExpirationPos != string.Empty)
     this.ExpirationPos = tfp.ExpirationPos;
   if (tfp.UsedSellSpotLimit != string.Empty)
     this.UsedSellSpotLimit = tfp.UsedSellSpotLimit;
   if (tfp.SellSpotLimit != string.Empty)
     this.SellSpotLimit = tfp.SellSpotLimit;
   if (tfp.Netto != string.Empty)
     this.Netto = tfp.Netto;
   if (!(tfp.Kgo != string.Empty))
     return;
   this.Kgo = tfp.Kgo;
 }
Beispiel #4
0
 public void Update(TransaqFortsPosition tfp)
 {
     if (tfp.SecId != -1)
     {
         this.SecId = tfp.SecId;
     }
     if (tfp.Client != string.Empty)
     {
         this.Client = tfp.Client;
     }
     if (tfp.StartNet != string.Empty)
     {
         this.StartNet = tfp.StartNet;
     }
     if (tfp.OpenBuys != string.Empty)
     {
         this.OpenBuys = tfp.OpenBuys;
     }
     if (tfp.OpenSells != string.Empty)
     {
         this.OpenSells = tfp.OpenSells;
     }
     if (tfp.TotalNet != double.MaxValue)
     {
         this.TotalNet = tfp.TotalNet;
     }
     if (tfp.TodayBuy != string.Empty)
     {
         this.TodayBuy = tfp.TodayBuy;
     }
     if (tfp.TodaySell != string.Empty)
     {
         this.TodaySell = tfp.TodaySell;
     }
     if (tfp.OptMargin != string.Empty)
     {
         this.OptMargin = tfp.OptMargin;
     }
     if (tfp.VarMargin != string.Empty)
     {
         this.VarMargin = tfp.VarMargin;
     }
     if (tfp.ExpirationPos != string.Empty)
     {
         this.ExpirationPos = tfp.ExpirationPos;
     }
     if (tfp.UsedSellSpotLimit != string.Empty)
     {
         this.UsedSellSpotLimit = tfp.UsedSellSpotLimit;
     }
     if (tfp.SellSpotLimit != string.Empty)
     {
         this.SellSpotLimit = tfp.SellSpotLimit;
     }
     if (tfp.Netto != string.Empty)
     {
         this.Netto = tfp.Netto;
     }
     if (!(tfp.Kgo != string.Empty))
     {
         return;
     }
     this.Kgo = tfp.Kgo;
 }