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

 採用された回答

Walter Roberson
Walter Roberson 2014 年 1 月 2 日

0 投票

You would probably be best off using a timer()

4 件のコメント

jimmy bodo
jimmy bodo 2014 年 1 月 2 日
Thought of using timer but the thing is that the data comes from another application whose clock is set and reset by an external server. There always exists a possibility of a mismatch in time.
Image Analyst
Image Analyst 2014 年 1 月 2 日
What form is the data in? Is it a file? Do you have to query that dde server to get new data that comes directly into your program into a variable that the server gives you?
Who cares if they're synced up? What if you just checked every minute? What's wrong with that? Sure you may waste a little bit of cpu time analyzing stuff that hasn't changed since last time, but that's no big deal - no harm in that.
Walter Roberson
Walter Roberson 2014 年 1 月 2 日
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 2014 年 1 月 3 日
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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFinancial Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by