检查线路状况 - 已触及/未触及

发布于 2025-01-13 04:21:47 字数 125 浏览 1 评论 0原文

我需要检查一条线的状况(触及、未触及、交易)以有条件地设置它们的样式。

我擅长“交易”条件(蜡烛收于线之上/之下),但不知道如何识别“触及/未触及”条件。 (例如,只是将一根灯芯插入该线)

有人能指点一下吗?

I need to examine the condition of a line (touched, untouched, traded) to conditionally style them.

I am good with "traded" condition (candle closes above/below line) but got no idea how to identify the "touched/untouched" condition. (e.g. just a wick into that line)

Someone please got a pointer?

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

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

发布评论

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

评论(2

倾城°AllureLove 2025-01-20 04:21:47

您应该查看高值和低值以查看是否触及线条。

例如,假设该线位于 120 处,最高价为 130,收盘价为 110。

通过查看这些值,您可以看到价格突破该线并回落到该线下方。于是,底线就被触动了。

要检查该线是否未被触及,只需检查是否 high < 120

对于低于价格的线,执行相反的过程。

You should look at the high and low values to see if a line is touched.

For example, say the line is at 120, high price is 130 and close price is 110.

By looking at those values, you can see that the price pushed through the line and pulled back below it. So, the line was touched.

To check if the line is untouched, simply check if high < 120.

Reverse the process for a line below the the price.

甜中书 2025-01-20 04:21:47

现在您可以使用line.get_price(LineA, bar_index+1)

我已经使用了 ta.cross(close, line.get_price(LineA, bar_index) 并让它对我很有用。

Now you can use line.get_price(LineA, bar_index+1).

I have used ta.cross(close, line.get_price(LineA, bar_index) and had it work good for me.

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