Exemplo n.º 1
0
 private void CalculateAllRequierdMargin()
 {
     foreach (var marginData in MarginDataDic.Values)
     {
         CalculateUNLRequierdMargin(marginData.Symbol);
         Distributer.Enqueue(marginData);
     }
 }
Exemplo n.º 2
0
 public void UpdateMaxMargin(List <ManagedSecurity> managedSecuritiesList)
 {
     foreach (var managedSecurity in managedSecuritiesList)
     {
         if (MarginDataDic.ContainsKey(managedSecurity.Symbol) == false)
         {
             continue;
         }
         var marginData = MarginDataDic[managedSecurity.Symbol];
         if (marginData == null)
         {
             var ex = new ArgumentNullException(nameof(marginData));
             Logger.Error($"There is no margin data for '{managedSecurity.Symbol}'!", ex);
             continue;
         }
         marginData.MarginMaxAllowed = managedSecurity.MarginMaxAllowed;
         Distributer.Enqueue(marginData);
     }
 }