Position assignment

<< Click to Display Table of Contents >>

Navigation:  Algorithms >

Position assignment

TradingDiary Pro uses automatic position assignment.


If you insert several trades to the database both opening and closing trades will automatically be assigned into positions.

In regular position sorting a position cannot be closed until the last opening trade is closed. For example a trade sequence by date order is:

1. Buy 100        MSFT               Open quantity: 100

2. Buy 50          MSFT               Open quantity: 150

3. Sell 100        MSFT               Open quantity: 50

4. Buy 50          MSFT               Open quantity: 100

5. Sell 100        MSFT               Open quantity:  0 - the position is closed.


The Start Date of this position is the 1. trading date, the End Date (close date) is the 5. trading date.


Another TradingDiary Pro speciality is that the software cannot 'slice' trades when sorting them into positions. It can manage situations that there are trades which are composed of more than one position.

An examples of trade sequence by date is the following:

1. Buy 100        MSFT                                                   Open quantity: 100

2. Sell  200       MSFT   the first position is closed           Open quantity: -100

3. Buy 100        MSFT   the second position is closed      Open quantity: 0


In this example there are two positions with 3 trades.

The first position is the 1. Buy 100 MSFT and the 2. Sell 200 MSFT.

The second position is  2. Sell 200 MSFT and the 3. Buy 100 MSFT.


In fact the first part of the second trade is bound to the first position and the second part is bound to the second position. Why is it important? Because in positions' view you will see the same sorting.