想创建一个用于交易视图的Pine脚本

发布于 2025-02-08 23:13:55 字数 132 浏览 1 评论 0 原文

想要创建一个用于创建指标的Pine脚本,该指标基于前一天的“历史值”开放蜡烛值。它应该基于公式

值=(SQRT(“ prev day open”)+9)^3

创建线路,请给我发送pine脚本,以根据给定条件创建此类水平线。

Want to create a pine script for creating an indicator which draws horizontal lines based on the "historic value" for previous day open candle value. And it should create lines based on the formula

value= (SQRT("prev day open")+9)^3

Please send me pine script for creating such horizontal lines based on the given condition.

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

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

发布评论

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

评论(1

国产ˉ祖宗 2025-02-15 23:13:55

我建议您,您可以熟悉Pine脚本语言参考,您可以在其中搜索这些内容

short Tradingvies Pine编辑器中的教程

您想要的变量看起来像是

value = math.pow(math.sqrt(open[1]) + 9, 3) //open[1] previous bar open

在某个条件下打印或显示水平线,您可以做到这一点:

if condition
   line.new(x1, y1, x2, y2) //you can look for help in the reference

请记住,TradingView具有限制一条线可以返回的许多条,图表上可以有多少

I recommend to you, that you get familiar to the Pine Script language reference, where you can search these things up

short tutorial in tradingvies pine editor

your wanted variable would look like that

value = math.pow(math.sqrt(open[1]) + 9, 3) //open[1] previous bar open

To print or display horizontal lines on a certain condition you can do that as follows:

if condition
   line.new(x1, y1, x2, y2) //you can look for help in the reference

keep in mind that tradingview has limitations on how many bars a line can go back, and how much there can be on a chart

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