MS Access programming

Discussion in 'Trading Software' started by gerritjan, May 11, 2001.

  1. gerritjan


    Anybody knows how to solve the following in MS access:
    Starting tabel are the times and sales of one day futures (in my case e-mini S&P500. I want to form a (new) table containing time and price of one start trade.
    Consequently get the time and price of the first sale one point lower or higher whichever is first.
    Next the time and price of the first sale one point higher or lower than the last.

    Is this possible with MS Access or should I try and find another tool.
    Mind you Excell doesnot work because the daily table of times and sales is way too big.

    Can anybody help me on this?
  2. Baron

    Baron ET Founder

    I'm confused on exactly what you are trying to accomplish. I need more info.

    Also, is your time and sales data split up into multiple columns on the first table? If so, how many columns do you have, what are their labels, and what types of data do they contain?

    By the way, I'm sure access -- or any other relational database -- can solve your problem, although Access may be slow compared to other databases if your tables have a very large number of rows.

  3. gerritjan


    Thanks for your reply Baron.
    I might consider another database program, I have MSaccess available though so I'd like to try it with that first.

    Here's some more information.

    The times and sales table contains the following columns:
    Key (MSAccess)
    Date (date/time)Always the same since it's a daily table.
    Time (date/time)
    Price (single precision)

    I want a table which shows:
    The price at 09.00.00 (first one during this second)
    The time the first sale took place 1 point higher (or one point lower, whichever is first.
    The time the first sale took place 1 point outside the previous range.

    09.00.00 1252
    09.01.25 1253
    09.02.02 1254
    09.05.45 1251
    09.10.17 1250 etc.

    I hope this makes things clear.
    My idea is to put in a loop in which you test for the boundaries. You have to be able to let the program change the boundaries and check again etc. until the end of the table.
  4. Baron

    Baron ET Founder

    Access alone is not going to accomplish that. You'll need to write a program in Visual Basic, C++, Java or some other language that has the capability of running queries on your Access database.

    For example, the program should run a SQL SELECT statement on table #1 for the first price at 9 AM, and then do an INSERT statment for sticking the resulting data into table #2. From there the program should do another SELECT statement for values either 1 point higher or lower than the 9 AM value, and then insert the time and price into the second row of table #2. The program then continues to loop through the data from table #1 looking for data that meets the conditions you specify, inserting each resulting set into table #2.

    In a nutshell, you'll need a working knowledge of a decent programming language and you'll also need to know how to construct SQL queries manually. I don't know if that's what you were thinking or not. I'm sure that someone who works with access and visual basic for a living could knock that out pretty fast. But it could be a real pain for just about anybody else.