Updating Multiple Worksheets With Live Market prices
Joel
Thanks for your response.
I tried the OnTime & a Windows API timer procedure, both of which I
found on Chip Pearsons webpage. The Windows API fell over after a
while as he predicted. The OnTime, which I lifted straight from the
webpage, makes one call and stops when run from the VBE and makes no
calls when assigned to a menu item. As the Windows timer worked fine
for 20 mins before crashing I know the rest of my code is ok. Cant
work out what the problem is. Ive left another post entitled Timer
Procedures with further details including a condensed version of the
code.
Regarding your suggestion to split the data after it has been
recorded, I had considered this initially but discounted it. Once I
have the data recorded I intend to chart it and perform some
statistical analysis on it to enable me to identify those factors
which indicate price movements, for example, exponential weighted
averages, standard deviations, bollinger bands, weight of money,
correlation, covariance etc. Once I have identified these variables, I
intend to write further procedures which analyse the data in real time
and flag up potential situations to trade on, and subsequently, to
automate the trading process. If my code doesnt split the data until
after the event, the market will be closed and I cant trade it.
Alternatively, I could code a solution that loops through the data on
a step value. If there are, say, 10 runners in a race, Id have to step
1, 11, 21, etc for the first in the market, 2, 12, 22, etc for the
second and so on. As Im not that au fait with VBA (this is my first
excursion into programming!), I think that this approach would exceed
my capabilities. I know my code works ok, except for the timer, but Im
sure its not a very elegant way of achieving it. No doubt VBA experts
could have done twice as much with half the code and in a fraction of
the time! My approach in overcoming the data split straight off the
bat should make subsequent coding simpler for me. Thats the theory,
anyway!
GG
|