An event that is raised when a position is overfilled.

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)


public event EventHandler<PositionOverfilledEventArgs> PositionOverfilled
Visual Basic
Public Event PositionOverfilled As EventHandler(Of PositionOverfilledEventArgs)
Visual C++
 event EventHandler<PositionOverfilledEventArgs^>^ PositionOverfilled {
	void add (EventHandler<PositionOverfilledEventArgs^>^ value);
	void remove (EventHandler<PositionOverfilledEventArgs^>^ value);
member PositionOverfilled : IEvent<EventHandler<PositionOverfilledEventArgs>,


Type: System..::..EventHandler<(Of <(<'PositionOverfilledEventArgs>)>)>


A position is considered overfilled when an order is filled which would result in the position reversing direction, or when an order is filled on a closed position. This event allows you to respond to this situation in your system code. If a handler for this event sets the Handled property of the PositionOverfilledEventArgs to true, then the action specified in the PositionOverfilledAction property will not be taken.

The fill may be partially applied to several different positions. It is first applied to the position that the order was originally submitted for (if that position is still open). The remaining shares will then be applied to existing positions for the same direction and symbol. If there are no such positions, or all of them are closed and shares still remain to be applied, then a new position will be created in the opposite direction, using whatever shares remain to be applied.

An OrderFilled event will be raised for each position that the fill is applied to. However, the PositionOverfilled event is raised before the corresponding OrderFilled event(s).

See Also