clc
close all
load disney;
candle(dis_HIGH(end-20:end), dis_LOW(end-20:end), dis_CLOSE(end-20:end),...
dis_OPEN(end-20:end), 'b');
%//======================
%// Get current axes
Axes1 = gca;
%// Get the current limits
Axes1XLim = get(gca,'XLim');
Axes1YLim = get(gca,'YLim');
%// Create new axes
hold on
NewAxes = axes('Position',get(gca,'Position'),'Color','none','XTick',get(Axes1,'XTick'),'YTick',get(Axes1,'YTick'),'NextPlot','add')
%// Plot your data on new axes
m = plot(NewAxes,2,20.4,'r^','MarkerFaceColor','r', 'MarkerSize',15);
%// Adjust its limits
xlim(Axes1XLim)
ylim(Axes1YLim)
matlab 特殊k线做标示
最新推荐文章于 2024-05-15 23:18:16 发布
本文通过Matlab代码展示了如何绘制并叠加股票K线图和标记特定价格点的方法。首先加载了迪士尼股票数据,接着使用candle函数绘制了最近20个交易日的K线图,并在现有坐标轴上创建新的坐标轴来显示一个特定的价格标记。
1万+

被折叠的 条评论
为什么被折叠?



