Excel Macro?

Discussion in 'Trading Software' started by rws3z, Oct 1, 2002.

  1. rws3z

    rws3z

    Hi,

    I currently have a live DDE feed into excel. I am looking for a macro that will take a snapshot of the quote and put it into the cell and then in some time period later (30s, 1 min, 5 min etc.) it will take another snapshot and put it into another cell. This will repeat itself for a set amount of time and then it once it reaches the last cell it will move the value up one cell. So R1 becomes Q1 and S1 becomes R1 and S1 is the new quote. I would like to do this so I can run live (20 min) percent-offset bands in excel without having to constantly pull up charts. I used tried using realtick but it forces you to start at a specified time so the data is not variable. I would also like to do that same with volume so I could create live Bollinger Bands, RSI, etc. in excel.


    Thanks
     
  2. chs245

    chs245

  3. chisel

    chisel

    You can set up an array that has prices every 5 minutes, e.g., and can be as many rows as you like.

    =qlink|bars!'es02z,5,90,dto,headers'

    This array formula gives you the Z e-minis every 5 minutes, 90 rows long with the date, time, and open.

    Then just run your BB formula off the data in the rows. Every 5 minutes the rows move up as a new one is inserted.

    There's a Qlink page on Quote.com that has all the symbols on it for the arrays, but I can't find it right now.

    HTH
     
  4. chisel

    chisel

    For some reason I thought you were using Qlink and Qcharts. Disregard my previous post if you're not using them.
     
  5. brad1970

    brad1970

    The following: Private Sub Worksheet_Change(ByVal Target As Range) should be the sub to which a macro is written to hold any changes.

    I am attempting to write the script myself. I have the time in cell A1 and the live quote in cell A3. Everytime the time changes the script should take the price in A1 and write it (copy /paste / value) into cell B3.

    Still a work in progress, will post when (and if) finished.
     
  6. cashonly

    cashonly Bright Trading, LLC

    Check out the Timer function in VBA. You can set it up at any interval you specify and then when it occurs, it calls the macro you specify and in there you can populate the cells you want.
     
  7. WhiteRhino

    WhiteRhino Guest

    Brad1970,

    Did you get your script written yet?

    I am looking into this also. I belive the VBA timer function along with saving all price changes and time of change into an array would be most "elegant" as the programmers say.

    I am looking at creating realtime studies in excel using esignal's DDE live data.

    I have created the formula for Stochastics on spreadsheet data but I need to have the formula calculating the Stochastics live with the data feed for signals.

    Any thoughts on that?
     
  8. Eurobum

    Eurobum

    Hi, I just subscribed with qchart today in order to use Qlink. I
    should check with this site before I made a commitment :).
    Anyway, I would like to ask all the experienced Qlink users
    how to stop qlink to push up the old data (5mn bar) while inserting the new one. In other words, keep the old data while inserting new ones. Thanks.
     
  9. DaveN

    DaveN

    Eurobum,

    I thought there was a tag that you could use in your QLink command.... QLink|Bars!'5,10,DTOHLC,REVERSE' or something like that, but I cannot find any reference to it.

    You don't mention whether you are proficient in programming in VBA. There are numerous solutions doing it that way.

    You could also use links to reference the original data. i.e. make the bottom line in the new array linked to the top of the QLink Bars! extract and work your way up the new array and down the extracted one.
     
  10. chisel I have never found much about QLink anywhere, I hope you find the link. Please post it if you do. Thanks.

    :)
     
    #10     Nov 6, 2002