如何检查低在地下

发布于 2025-01-24 10:15:53 字数 328 浏览 2 评论 0原文

我有以下图,

last13 = lowest(close, 13)
Bottom = last13 == nz(last13[1]) ? last13 : na
plot(Bottom, color=#0000ff, linewidth=4, style=plot.style_linebr, title="Bottom", offset=0)

它将在图表上绘制一条短线。

我想计算出现线路出现的条的数量。

我还要检查从线的开头,在那条短直线下是否有低点或等于任何低点。如果是,请返回true,如果不是,请返回false。

我该怎么做?

I have the following plot

last13 = lowest(close, 13)
Bottom = last13 == nz(last13[1]) ? last13 : na
plot(Bottom, color=#0000ff, linewidth=4, style=plot.style_linebr, title="Bottom", offset=0)

It will draw a short straight line on the chart.

I would like to count the number of bars where the line appears.

I want to check also if there is any low under or equal that short straight line, from the beginning of line. If yes, return true, if not, return false.

How can I do that?

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

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

发布评论

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

评论(1

污味仙女 2025-01-31 10:15:54

您可以为此使用var计数器。

var int bottom_counter = 0
bottom_counter := (not na(Bottom)) ? bottom_counter + 1 : 0

You can use a var counter for this.

var int bottom_counter = 0
bottom_counter := (not na(Bottom)) ? bottom_counter + 1 : 0
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文