Instrument

View as Markdown

Definition

Gets the instrument of an account position.

Property Value

An Instrument representing the account’s instrument position.

Syntax

PositionAccount.Instrument

Examples

1protected override void OnPositionUpdate(Position position, double averagePrice, int quantity, MarketPosition marketPosition)
2{
3 // If the position is an AAPL position
4 if (PositionAccount.Instrument.MasterInstrument.Name == "AAPL")
5 {
6 //do something
7 }
8}