Summary
Provides data for the position closing event.
Syntax
public class PositionClosedEventArgs : Object
Members
Name | Type | Summary |
---|---|---|
Position | Property | Gets the position being closed. |
PositionClosedEventArgs | Method | Provides data for the closing positions event. |
Reason | Property | Gets the reason of the position being closed. |
Example 1
protected override void OnStart() { Positions.Closed += PositionsClosed; } private void PositionsOnClosed(PositionClosedEventArgs args) { var position = args.Position; Print("Position closed with {0} profit", position.GrossProfit); }