フィルターのクリア

any convenient way to plot stock trading data without after & pre market data

1 回表示 (過去 30 日間)
Yu Li
Yu Li 2023 年 7 月 19 日
コメント済み: Angelo Yeo 2023 年 7 月 20 日
Hi:
I have stock market data and trying to plot them, the problem I'm facing is that, I want to look at the stock intraday data in several days together. I only want to look at the price change during trading hours (9:30 am to 4:00 pm), due to the time gap (after-market hours & premarket hours) between two trading days, the plot contains a large gap as shown below, which is very low quality.
is there any convenient way to visualize the intraday data for serveral continuous days?
the test data is uploaded.
Thanks!
Yu

採用された回答

Angelo Yeo
Angelo Yeo 2023 年 7 月 20 日
I'm not sure if there are any off-the-shelf ways or any equivalent easy ways to break time axis. This is because the time values are what they are.
I can only think of changing xtick labels after plotting the only price values.
websave("test.mat","https://kr.mathworks.com/matlabcentral/answers/uploaded_files/1438133/test.mat");
load("test.mat");
plot(test.price)
newTicks = floor(linspace(1, height(test), 4)); % 4 is the number of xticks to use.
xlim([1, height(test)]);
xticks(newTicks)
xticklabels(cellstr(test.dateTime(newTicks),'MMM dd, HH:mm'))
  2 件のコメント
Yu Li
Yu Li 2023 年 7 月 20 日
HI:
thank you. yes I agree, the datetime is what it is, so probably this is the best workaround so far.
If Mathworks can consider a new feature - to display the data with specified axis range in figures, that will be great.
Thanks!
Yu
Angelo Yeo
Angelo Yeo 2023 年 7 月 20 日
Hi Yu,
Let me report your request internally. In general, if you want to request an enhancement, you can contact Technical Support.
https://www.mathworks.com/support/contact_us.html?s_tid=hp_ff_s_support

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTransaction Cost Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by