it's been awhile since i have experimented with exporting data, so i'm a little rusty. i think you can configure excel to pull data on some interval.
you could collect data every x seconds. then use excel to combine the data into the desired timeframe.
the default way RTD works is, it keeps pulling new data, and overwriting previous data.
at the end of this post, is a macro that copies new data to a new cell,
here are some links/info related to RTD
how to export tos data to excel
this will create a collection of formulas in excel, that will pull live data
it will not save it. Each new data overwrites the previous data
TOS
marketwatch > quotes
setup page with symbols and data columns
settings( top right) > export > to microsoft excel
go to an excel sheet, pick a cell , and paste
creates a bunch of rtd( ) formulas, to pull all the data, as it was laid out on marketwatch page.
=RTD( " tos.rtd", , "last", "SPY" )
get last price for stock symbol in cell c1
=RTD( " tos.rtd", , "last", C1 )
i think the Excel formula RTD() will only work on a computer that has TOS installed
https://learn.microsoft.com/en-us/office/troubleshoot/excel/set-up-realtimedata-function
hahn-tech
https://www.hahn-tech.com/thinkorswim-rtd-excel/
thinkorswim RTD excel
https://futures.io/thinkorswim-prog...inkorswim-trading-platform-volumes-price.html
Connecting ThinkOrSwim to Excel
Part 1 of 4
https://www.lockeinyoursuccess.com/connecting-thinkorswim-to-excel-part-1-of-4/
Part 2 of 4
www.lockeinyoursuccess.com/connecting-thinkorswim-to-excel-part-2-of-4
Part 3 of 4
www.lockeinyoursuccess.com/connecting-thinkorswim-to-excel-part-3-of-4
Part 4 of 4
www.lockeinyoursuccess.com/connecting-thinkorswim-to-excel-part-4-of-4-finale
from 1of4
RTD VBA
Building Excel Real-Time Data Components in Visual Basic .NET
https://docs.microsoft.com/en-us/pr...-xp/aa140061(v=office.10)?redirectedfrom=MSDN
may have to adjust excel security settings to get rtd() to work
https://support.microsoft.com/en-us/help/286259/security-settings-and-excel-realtimedata-servers
misc links
--------
https://docs.microsoft.com/en-us/pr...=office.10)#odc_xlrtdfaq_howconfigrtdthrottle
https://docs.microsoft.com/en-us/office/troubleshoot/excel/set-up-realtimedata-function
-----
https://news.cqg.com/blogs/2011/04/adjusting-rtd-interval-throttle-microsoft-excel
https://documentation.softwareag.co...ml#page/um-webhelp/co-throttleinterval_8.html
https://superuser.com/questions/146...-received-through-excel-rtd-and-original-data
-----
https://stackoverflow.com/questions/28397363/pause-rtd-server-in-excel-and-save-worksheet
-----
https://www.codevba.com/excel/RTD.htm#.YUQBTmlOlPw
------
https://forums.aeromir.com/threads/how-to-start-using-rtd-in-excel.1459/page-2
-----
use a macro to copy data to a new cell, to save it
recording spx using tos and rtd function
mhaddadi
[media]
[/media]
each second, this macro copies the price data, from D1, down to a lower cell, in column B.
Cells(m, 2) = Cells(1, 4)
Cells(row, column)
the code would have to be changed to copy more data.
Code:
' vba code
' module1
Sub timer()
' run a macro every sec
Application.OnTime Now() + TimeValue("00:00:01"), "main"
End Sub
Sub main()
' row counter
m = m + 1
' put time in row m at column 1
Cells(m, 1) = Now
' pull stock data value from D1, put in row m at column 2
Cells(m, 2) = Cells(1, 4)
' call other macro
timer
End Sub
hal_xls