Caplin Trader 5.1.0

Class: module:ct-trading/trademodel/StructureChangedEvent

module:ct-trading/trademodel/StructureChangedEvent(oLeg, nStructureChangedType, sEventSource)

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

Constructor

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

The constructor for a StructureChangedEvent.

Parameters:
Name Type Description
oLeg module:ct-trading/trademodel/TradeLeg

The leg that has been added or removed.

nStructureChangedType module:ct-trading/trademodel/StructureChangedType

The type of structure change that has occurred.

sEventSource module:ct-trading/statemachine/TransitionSource

The source of the transition that has caused the structure change.

Methods

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

Get the trade let that has either been added or removed and caused the event.

Returns:

The trade leg.

Type
module:ct-trading/trademodel/TradeLeg

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

Gets the source of the event that caused the structure change.

Returns:

the source of the event

Type
module:ct-trading/statemachine/TransitionSource

getType() → {module:ct-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:ct-trading/trademodel/StructureChangedType