Table of Contents

Position

For the position calculation it is necessary to use the IPositionManager interface implementation, by way of PositionManager.

Prerequisites

Strategies

The position calculation adding to the SampleSMA

  1. You should add the text box for the current position display in the information output window:

    <Label Grid.Column="0" Grid.Row="5" Content="Pos:" />
    <Label x:Name="Position" Grid.Column="1" Grid.Row="5" />
    
    
  2. Next, you need to extend the event method-handler of the strategy parameter change:

    this.GuiAsync(() =>
    {
     Status.Content = _strategy.ProcessState;
     PnL.Content = _strategy.PnL;
     Slippage.Content = _strategy.Slippage;
     Position.Content = _strategy.Position;
    });
    
    

Next Steps

Latency