Caplin Trader 4.7.1

Class: module:caplin/trading/trademodel/StructureChangedEvent

module:caplin/trading/trademodel/StructureChangedEvent

A StructureChangedEvent is created dispatched to indicate that the structure of a trade has changed.

Constructor

new module:caplin/trading/trademodel/StructureChangedEvent(oLeg, nStructureChangedType, sEventSource)

The constructor for a StructureChangedEvent.
Parameters:
Name Type Description
oLeg module:caplin/trading/trademodel/TradeLeg The leg that has been added or removed.
nStructureChangedType module:caplin/trading/trademodel/StructureChangedType The type of structure change that has occurred.
sEventSource module:caplin/trading/statemachine/TransitionSource The source of the transition that has caused the structure change.

Methods

getLeg() → {module:caplin/trading/trademodel/TradeLeg}

Get the trade let that has either been added or removed and caused the event.
Returns:
The trade leg.
Type
module:caplin/trading/trademodel/TradeLeg

getSource() → {module:caplin/trading/statemachine/TransitionSource}

Gets the source of the event that caused the structure change.
Returns:
the source of the event
Type
module:caplin/trading/statemachine/TransitionSource

getType() → {module:caplin/trading/trademodel/StructureChangedType}

Gets the type of structure event that has occurred. Either an add or a remove.
Returns:
the structure change type
Type
module:caplin/trading/trademodel/StructureChangedType