SellAtAcebergToPosition

SellAtAcebergToPosition
public void SellAtAcebergToPosition(Position position, decimal price, decimal volume, int orderCount)

The method adds a new iceberg order to an already existing short position. It accepts the following parameters:

1. position – the position that needs to be modified;

2. price – the price at which the orders will be placed;

3. volume – the volume for the iceberg order;

4. orderCount – the number of orders over which the specified volume will be distributed;

Iceberg orders are emulated by the program. The volume passed to the method is split into a number of orders depending on the orderCount parameter, and these orders are placed sequentially as the previous ones are filled.

1. The algorithm sells 50 lots on the market.

2. Sells another 50 lots using an iceberg order.

Thus, the position will contain one market order for 50 lots and 5 limit orders for 10 lots each after execution.

If you have any difficulties or questions, please write to the support chat. Link