You have to keep track of your trading over time.
You have to keep track of what you or your Automated Trading System is doing.
You need to store what was done, when, and why.
Besides, the IRS is coming on 4/15/2003 for sure,
if not sooner.
That means storage of your trading events on a hard
drive and with backup.
I choose to use the Microsoft .mdb format and
access it from VB?with DAO 3.6.
There is a table of trades. It has an entry order
number and an exit order number in each record. There are lots of other fields
to keep track of when, where, and why.??
A recordset RS.TradesEnter is created indexed on
the openOrderNumber.
A recordset RS.TradesExit is created indexed on the
exitOrderNumber.
They both point to the same table.
?
Creating a unique entry order number is as
follows.
RS.TradesEnter.MoveLast
thisEntryOrderNumber =
RS.TradesEnter![openOrderNumber] + 2
thisExitOrderNumber = thisEntryOrderNumber +
1
Now create a new trade record.
RS.TradesEnter.AddNew
??? RS.TradesEnter![openOrderNumber]
= thisEntryOrderNumber
???
RS.TradesEnter![closeOrderNumber] = thisExitOrderNumber
RS.TradesEnter.Update
?
When a fill arrives, whether partial of full,
RS.TradesEnter updates the when,where,why fields.
When you or your ATS decides to close a position,
RS.TradesExit "seeks" this ExitOrderNumber and updates the when, where, why
fields.
That should keep you and the IRS
happy.
Comments?
RCarey
?