예제 #1
0
 /// <summary>
 /// Event driven handler for a change to Tax Lots.
 /// </summary>
 /// <param name="sender">The object that originated the event (ignored).</param>
 /// <param name="taxLotEventArgs">The event argument.</param>
 private static void TaxLotHandler(object sender, TaxLotEventArgs taxLotEventArgs)
 {
     // Extract the event argument and call a common method for testing the position against the list rule.
     if (AlphaListRule.alphaPositionTable.Contains(taxLotEventArgs.TaxLot.Position))
     {
         AlphaListRule.updatePositionTable.Add(taxLotEventArgs.TaxLot.Position);
     }
 }
예제 #2
0
 /// <summary>
 /// Broadcasts a change of record event.
 /// </summary>
 /// <param name="taxLotsEventArgs">The event argument.</param>
 public static void OnTaxLotChanged(TaxLotEventArgs taxLotsEventArgs)
 {
     // Broadcast the event to any listeners.
     if (TaxLot.Changed != null)
     {
         TaxLot.Changed(typeof(TaxLot), taxLotsEventArgs);
     }
 }
예제 #3
0
        /// <summary>
        /// Checks to make sure that a tax lot doesn't violate a list of restricted securities.
        /// </summary>
        /// <param name="sender">The object that originated the event (ignored).</param>
        /// <param name="taxLotEventArgs">A proposed order that is to be checked.</param>
        private static void TaxLotHandler(object sender, TaxLotEventArgs taxLotEventArgs)
        {
            // Extract the event argument.
            TaxLot taxLot = taxLotEventArgs.TaxLot;

            // There is no need to recalculate the market and sector values if the the account is not part of this compliance
            // restriction.  A quick filter should be part of all compliance checks to prevent unnecessary calculations.
            if (TelecomConcentration.betaAccountList.Contains(taxLot.Position.Account))
            {
                TelecomConcentration.updateAccountList.Add(taxLot.Position.Account);
            }
        }
예제 #4
0
 /// <summary>
 /// Adds a TaxLotEventArgs to the list.
 /// </summary>
 /// <param name="taxLotEventArgs">The event arguments to be added to the list.</param>
 /// <returns>The index of the new value.</returns>
 public int Add(TaxLotEventArgs taxLotEventArgs)
 {
     // Add the event arguments to the list.
     return(base.Add(taxLotEventArgs));
 }