Skip to content

PositionClosedEventArgs

Summary

Provides data for the position closing event.

Signature

1
public class PositionClosedEventArgs

Namespace

cAlgo.API

Properties

Name Description
Position { get; } Gets the position being closed.
Reason { get; } Gets the reason of the position being closed.

Examples

1
2
3
4
5
6
7
8
9
 protected override void OnStart()
 {
     Positions.Closed += PositionsClosed;
 }
 private void PositionsOnClosed(PositionClosedEventArgs args)
 {
     var position = args.Position;
     Print("Position closed with {0} profit", position.GrossProfit);
 }

See Also


Last update: July 1, 2022

Comments