PositionClosedEventArgs


Summary

Provides data for the position closing event.

Syntax

public class PositionClosedEventArgs : Object

Members

NameTypeSummary
Position PropertyGets the position being closed.
PositionClosedEventArgs Method
Reason PropertyGets 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);
}