SellAtAceberg

SellAtAceberg

The SellAtAceberg methods are used for opening short positions, in which the opening orders are placed as iceberg orders. In reality, 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.

public Position SellAtAceberg(decimal volume, decimal price, int orderCount)

1. volume – the total volume for the position;

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

3. orderCount – the number of orders the position volume will be distributed across;

We want to sell 100 lots but do not want to disclose the entire volume in the order book. The program will divide the volume into 5 parts and place the first sell order with a volume of 20. After it is filled, the next order will be placed and so on until 100 lots are accumulated.

public Position SellAtAceberg(decimal volume, decimal price, int orderCount, string signalType)

This method performs all the same actions as the previous one, but in addition, it also takes a string as the name of the signal in the signalType parameter.

1. Create a variable of type string and initialize it with an appropriate value depending on the current market time.

2. Open a short position using an iceberg order.

3. Access the SignalTypeOpen field on the position instance to get its value and log an informational message about which signal was activated.

As a result, we can see the names of the signals in the position tables in the software interface.

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