
public void BuyAtAcebergToPosition(Position position, decimal price, decimal volume, int orderCount)
The method adds a new iceberg order to an existing position. It accepts the following parameters:
1. position – the position that needs to be modified;
2. price – the price at which 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;
The iceberg orders are emulated by the program. The volume passed to the method is split into several orders depending on the orderCount parameter, and these orders are placed sequentially as the previous ones are filled.

1. The algorithm purchases 50 lots on the market.
2. It then buys an additional 50 lots using an iceberg order.
As a result, we can see one market order for 50 lots and 5 limit orders for 10 lots each in the trade log, position detail window.

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