我们如何在金融烛台图表上绘制红点(代表交易)?

发布于 2024-08-27 13:24:31 字数 232 浏览 2 评论 0原文

我正在使用以下 MATLAB 函数绘制金融烛台图:

http://www. mathworks.com/help/toolbox/finance/candlefts.html

如何在图表上绘制红点来代表该点的交易?

I am plotting a financial candlestick chart using this MATLAB function:

http://www.mathworks.com/help/toolbox/finance/candlefts.html

How do I plot a red dot on the chart, to represent a trade at that point?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岛歌少女 2024-09-03 13:24:31

对于要添加的点,您需要其在 y 轴 yValue 上的位置以及将其放置在 x 轴 xValue 上的日期(格式为作为单个序列日期号)。那么以下应该可以工作:

candle(...);  %# Make your candle plot
hold on;      %# Add to the existing plot
plot(xValue,yValue,'r.');  %# Plot a red dot

如果您想要更大的红点,您可以将最后一行替换为以下任一内容:

plot(xValue,yValue,'r.','MarkerSize',20);
plot(xValue,yValue,'ro','MarkerFaceColor','r');

For the point you want to add, you would need its position on the y-axis yValue and the date where it is to be placed on the x-axis xValue (formatted as a single serial date number). Then the following should work:

candle(...);  %# Make your candle plot
hold on;      %# Add to the existing plot
plot(xValue,yValue,'r.');  %# Plot a red dot

If you want a larger red dot, you can replace the last line with either of the following:

plot(xValue,yValue,'r.','MarkerSize',20);
plot(xValue,yValue,'ro','MarkerFaceColor','r');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文