Skip to content

Closed Event

Summary

Occurs each time a position is closed.

Signature

1
public abstract event Action<PositionClosedEventArgs> Closed;

Declaring Type

cAlgo.API.Positions

Examples

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

Last update: December 8, 2022

Comments