[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

real time data graphing/analysis speadsheet



PureBytes Links

Trading Reference Links

You can save/graph up to 255 fields of information.

Attached is a spreadsheet which will copy information from a real time DDE
datafeed  (I have it set up for quote.com, you can use any other one as
well) and graph the information or any formulas you create.

I have it set up to update every 5 seconds.  You can adjust it to update
whatever time frame you like.

To make it work, do the following:
Open spreadsheet with Excel 97
enable macros
update all linked information
select : tools, macro,macros,run datatimer

to edit the update frequency or add more symbols to track:
tools,
macro,
macros,
edit

You must put the Qlink dde instructions in columns b1 thru ?1directly.  You
cannot
reference another area which contains the Qlink DDE instructions.

To stop the macro, click on another sheet in the workbook.

To use Excel for something else, open another version of it.  The program
will not let you work on another sheet at the same time the macro runs.
(Maybe someone can fix this)

If anyone adds any interesting features to this spreadsheet, I would
appreciate letting me see what  you have done.  A problem I encounter is
that when the program runs, I cannot use any other sheets or workbooks.  The
program stops dead in its tracks.  I would like to be able to work on many
other spreadsheets, reference this spreadsheet and create charts while the
program is saving information.

Below is the code which accomplishes all this.

Use at your own risk.  Not responsible for anything bad that happens as a
result of using this.


' Copy Cells Macro
'
'

Sub DataTimer()
' start time checking loop
' to change time, modify the hour, minute or second entry

    If Time() <= #11:59:00 PM# Then

' to change the data capture interval, you can change the hours, minutes or
seconds
' it is now set for 5 SECOND invervals

        Application.OnTime Now + TimeValue("00:00:05"), "dorow"

    End If

End Sub




Sub dorow()

' identify the number of columns you want to track; it is set to 25
    colnumber = 25

' update OLE links
    ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources

' copy row 1
    Worksheets("dataarea").Range(Cells(1, 1), Cells(1, colnumber + 1)).Copy

    Worksheets("dataarea").Range("a1").End(xlDown).Offset(1, 0).PasteSpecial
xlValues

    Application.CutCopyMode = False

' call DataTimer module
    DataTimer

End Sub








Attachment Converted: "c:\eudora\attach\copycells.xls"