handling real time data

2 views (last 30 days)
jimmy bodo
jimmy bodo on 2 Jan 2014
Commented: jimmy bodo on 3 Jan 2014
Hi everyone, for the past few days I have been working on a trading system. The problem is the I cant seem to find a way to handle prices that come in once every 5 mins. I have developed couple of indicators that take in prices and generate the most probable outcome. Everything worked fine when I had the data stored. How do i work with data which is constantly updated every few minutes. The indicators need to store their past decisions, upon which they make their present decisions. Everytime I update my data, the system has to work all over again on the previous data plus the current data. Every run takes about a minute. Is there a way to some how pause the system ...to constantly receive data and output the outcome and then increase the array size and wait till the new batch of data arrives????
PS The source of data is metatrader dde server. PPS I have never worked with constantly updating data

Accepted Answer

Walter Roberson
Walter Roberson on 2 Jan 2014
You would probably be best off using a timer()
  4 Comments
Walter Roberson
Walter Roberson on 2 Jan 2014
What mechanisms exist to probe whether there is data available ?
If you were to fire a timer every 2 minutes and do the probe, then you will not miss any and you will be finished the processing before the next timer fires.
jimmy bodo
jimmy bodo on 3 Jan 2014
Prices change every second so a gap of 2 mins is something I cant afford. Thanks for the suggestion though. I was hoping that matlab itself might have the feature to run a function whenever new data is available

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!