如何更改情节形状与蜡烛的距离

发布于 2025-01-20 20:48:15 字数 837 浏览 2 评论 0原文

我希望能够指定绘图形状的距离。 我发现这个 帖子 相关,但有那里没有有用的答案。

所以基本上我希望能够指定箭头与蜡烛顶部的距离,以便稍后我能够在蜡烛顶部绘制多个箭头。 例如:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

我希望最终能够做到这一点

在此处输入图像描述

I want to be able to specify the distance of my plotshape.
I found this post related but there is no useful answer there.

so basically I want to be able to specify the distance of the arrow from the top of the candle, so later I be able to plot multiple arrow on the top of the candle.
As an example:

enter image description here

or

enter image description here

or

enter image description here

I want to be able to do this eventually

enter image description here

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

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

发布评论

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

评论(1

来日方长 2025-01-27 20:48:15

如果您想为此使用 plotshape(),请将 location 参数设置为 location.absolute。然后调整仓位的价格。

您还可以使用标签来实现这一点。

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © vitruvius

//@version=5
indicator("My script", overlay = true)

atr = ta.atr(10)
pos1 = high + (1 * atr)
pos2 = high + (2 * atr)
pos3 = high + (3 * atr)
c = barstate.islast

plotshape(c ? pos1 : na , "One", shape.xcross, location.absolute, color.red, 0, "One")
plotshape(c ? pos2 : na , "Two", shape.diamond, location.absolute, color.yellow, 0, "Two")
plotshape(c ? pos3 : na , "Three", shape.square, location.absolute, color.green, 0, "Three")

输入图片此处描述

If you want to use plotshape() for that, set your location argument to location.absolute. Then adjust the price for position.

You can also use labels for that.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © vitruvius

//@version=5
indicator("My script", overlay = true)

atr = ta.atr(10)
pos1 = high + (1 * atr)
pos2 = high + (2 * atr)
pos3 = high + (3 * atr)
c = barstate.islast

plotshape(c ? pos1 : na , "One", shape.xcross, location.absolute, color.red, 0, "One")
plotshape(c ? pos2 : na , "Two", shape.diamond, location.absolute, color.yellow, 0, "Two")
plotshape(c ? pos3 : na , "Three", shape.square, location.absolute, color.green, 0, "Three")

enter image description here

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