This function periodically queries a public data source for a current price of given
symbol and updates an intra-daily chart for that security. A working example is symbol
“^GSPC” for the S&P500 index which can be obtained in real-time during (New York)
trading hours. Other symbols may work.
An alternate version offering 24-hour coverage, for example for futures on Globex, is
being prepared.
The function could be further generalized in numerous way and should be considered
‘alpha’. Current default values are a 15 second sleep, and fixed cut-off times
for market open/close states corresponding to NYSE hours. The data history is reset to
the two most recent days at the close, amd the data is snapshot to file (with the
filename derived from the symbol, and the path given by tools::R_user_dir
).
These parameters might become configuration parameters in the future.