Exemple #1
0
 /// <summary>
 /// Broadcasts a change of record event.
 /// </summary>
 /// <param name="proposedOrdersEventArgs">The event argument.</param>
 public static void OnProposedOrderChanged(ProposedOrderEventArgs proposedOrdersEventArgs)
 {
     // Broadcast the event to any listeners.
     if (ProposedOrder.Changed != null)
     {
         ProposedOrder.Changed(typeof(ProposedOrder), proposedOrdersEventArgs);
     }
 }
Exemple #2
0
 /// <summary>
 /// Event driven handler for a change to Proposed Orders.
 /// </summary>
 /// <param name="sender">The object that originated the event (ignored).</param>
 /// <param name="proposedOrderEventArgs">The event argument.</param>
 private static void ProposedOrderHandler(object sender, ProposedOrderEventArgs proposedOrderEventArgs)
 {
     // Extract the event argument and call a common method for testing the position against the list rule.
     if (AlphaListRule.alphaPositionTable.Contains(proposedOrderEventArgs.ProposedOrder.Position))
     {
         AlphaListRule.updatePositionTable.Add(proposedOrderEventArgs.ProposedOrder.Position);
     }
 }
Exemple #3
0
        /// <summary>
        /// Checks to make sure that a new proposed order doesn't violate a list of restricted securities.
        /// </summary>
        /// <param name="sender">The object that originated the event (ignored).</param>
        /// <param name="proposedOrderEventArgs">A proposed order that is to be checked.</param>
        private static void ProposedOrderHandler(object sender, ProposedOrderEventArgs proposedOrderEventArgs)
        {
            // Extract the event argument.
            ProposedOrder proposedOrder = proposedOrderEventArgs.ProposedOrder;

            // 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(proposedOrder.Position.Account))
            {
                TelecomConcentration.updateAccountList.Add(proposedOrder.Position.Account);
            }
        }
Exemple #4
0
 /// <summary>
 /// Adds a ProposedOrderEventArgs to the list.
 /// </summary>
 /// <param name="proposedOrderEventArgs">The event arguments to be added to the list.</param>
 /// <returns>The index of the new value.</returns>
 public int Add(ProposedOrderEventArgs proposedOrderEventArgs)
 {
     // Add the event arguments to the list.
     return(base.Add(proposedOrderEventArgs));
 }