代码以交易倒数eft -s-两个符号相同图表 - 松编辑器

发布于 2025-01-19 07:44:46 字数 526 浏览 0 评论 0原文

事先感谢您的帮助。

我有一种交易逆ETF的策略,而不是长时间交易。我试图在Pine 5中找出代码,以说出脚本 /策略发出短信号以购买某个符号时。就我而言,TNA是长的,短是TZA(其逆)。在参考手册中,它具有符号重新符,请参见符号的手册该代码为:`input.symbol

input.symbol(defval,title,tooltip,intelin,inline,group,confacs)→输入字符串 例子 i_sym = input.symbol(“ dell”,“符号”) s = request.security(i_sym,'d',关闭) 绘图<代码>在此处输入代码

返回 输入变量的价值。

也就是说,策略会认识到这一点吗?有更好/正确的方法吗?

thanks in advance for your help.

I have a strategy to trade inverse ETF's, as opposed to trading long and then short. I am trying to figure out the code in Pine 5 to tell the script / strategy when a short signal is issued to buy a certain symbol. In my case, long is TNA and short is TZA (its inverse). In the reference manual it has a symbol refence, see Pine Reference manual for Symbol That code is: `input.symbol

input.symbol(defval, title, tooltip, inline, group, confirm) → input string
EXAMPLE
i_sym = input.symbol("DELL", "Symbol")
s = request.security(i_sym, 'D', close)
plot(s)enter code here

RETURNS
Value of input variable.`

That said, will a strategy recognize this? Is there a better/proper way to do this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文