On the account detail page (“Data Quality” tab), the “Closing trades without opening” card lists sales or buy-backs that the broker reports as closing a position for which sTraderZ.com knows no opening. This is not a program error; it is a sign that shares are missing from your history.
Why the message appears
sTraderZ.com keeps a running holding for each instrument, trade by trade: buys add, sales subtract, custody transfers and stock splits are included. The card triggers when the broker flags a trade as “close” while the holding before it is exactly 0. Then there is nothing the trade could close.
Typical causes:
- Custody transfer from another broker or account. The shares arrived by transfer, so there was no purchase that could be imported.
- The import period starts too late. The purchase lies before the oldest date you imported.
- Shares from an exchange, spin-off, merger, gift or inheritance. There was no purchase in the usual sense.
- Ticker or account change at the broker: purchase and sale appear under different names.
Why the message often shows up months after the actual gap
The card names the trade at which the holding was 0 when it closed, not the trade from which something is missing. Example with a stock XYZ where one share is missing:
| Date | Trade | Holding after | Flagged? |
| 6 Feb | Buy 1 | 1 | no |
| 7 Mar | Sell 2 (close) | −1 | no, the holding before was 1, not 0 |
| 13 May | Buy 3 | 2 | no |
| 9 Jun | Sell 2 (close) | 0 | no |
| 10 Jun | Sell 1 (close) | −1 | yes, the holding before was 0 |
The missing share has an effect from 7 March, but it is only flagged on 10 June. The later purchase of 3 shares temporarily “covered” the gap. For the fix, what counts is the date from which the holding is missing (here 7 March), not the date of the message.
The most common mistake when adding it: the wrong date
If you add the missing shares as a custody transfer and type today’s date as the transfer date, the message does not go away. The transfer then sits after all the sales. At the time of the sales the holding is still missing, the card stays unchanged and it looks as if your entry did nothing. In the example, the entry must be dated 7 March or earlier.
| Entry of 1 share dated … | Result |
| today (after all sales) | Holding on 10 Jun is still 0, the message stays |
| 7 March or earlier | Holding on 7 Mar = 2, the sale works out, the end result is 0, the message disappears |
How to fix it, step by step
- Open the account detail page of the affected account and switch to the “Data Quality” tab.
- If the purchase was made before your imported data begins, click “Add past purchase” in the row of the sale. The dialog opens with symbol and quantity already filled in and tells you the latest possible purchase date. Enter the purchase date, the price per share and the fees; the dialog calculates the cost basis itself.
- If the shares instead arrived by transfer from another portfolio, choose “Was it a portfolio transfer?”. The form opens with symbol, quantity and transfer date. Enter the acquisition cost (total amount for these shares, not the price per share) and the original acquisition date. You will find both on the purchase confirmation or the custody statement of the previous broker.
- Check the quantity: enter exactly the missing amount. Too much creates a phantom holding that later shows up as an open position.
- Save. Cycles are re-detected and the card updates immediately. The position flows tax-neutrally into the FIFO calculation and the tax report with the cost you entered.
Entered it wrongly? Change the date or delete the entry
Open the “Transfers” tab of the same account. Entries you created by hand carry the “manual” badge and have a date field with “Save date” and a “Delete” button in the last column. Imported transfers cannot be changed there; they belong to the broker import. After every change, cycles and the card are recalculated.
Adding a purchase from before your import start
You bought the shares in the same account, but before the earliest date of your import: use “Add past purchase”, at the top right of the trade history and in the “Transfers” tab of the account detail page. Enter purchase date, quantity, price per share and fees; the cost basis (quantity × price + fees) is shown right away. After saving, the dialog stays open so you can add further partial purchases directly.
From then on the purchase counts everywhere sTraderZ.com calculates with cycles: in the trade log, in the analyses and the strategy performance (realised and open profit), and in the tax report. In the trade history it appears as a separate row with the “Purchase (manual)” badge; the two icons next to it let you edit or delete it. A holding that arrived by portfolio transfer is shown with the “Added manually” badge instead and is changed in the “Transfers” tab.
Cannot find an opening in your statements?
- Import an earlier period. With Interactive Brokers, fetch the Flex Query for earlier years and load it. If the broker no longer provides the period, use the next point.
- Document from the previous broker or the transfer request. It usually shows date, quantity and cost price. Use those values for your entry.
- Spin-off, merger or exchange: the new shares usually inherit cost and date of the old ones. Look at the original security and split accordingly.
- Gift or inheritance: the value and date at the time of acquisition apply.
- Nothing can be found any more: enter your best provable value and note where it came from. sTraderZ.com calculates with the amount entered, so an estimate flows into the tax report just like a documented value. You are responsible for the figure.