如何在周期中进行一系列计算?
我只需要更改一个参数,就必须进行一堆计算。
例如:
Calculation100 = Something100 + SomethingElse100[1] * Other100 / Another100
Calculation110 = Something110 + SomethingElse110[1] * Other110 / Another110
.
.
.
Calculation1120 = Something1120 + SomethingElse1120[1] * Other1120 / Another1120
或以更概念的方式使用相同的示例:
for n = 10 to 112
Calculation(n*10) = Something(n*10) + SomethingElse(n*10)[1] * Other(n*10) / Another(n*10)
它如何在Pine脚本V5中起作用,而不是手动制作它们?
I have to make a bunch of calculations with only one parameter changing.
For example:
Calculation100 = Something100 + SomethingElse100[1] * Other100 / Another100
Calculation110 = Something110 + SomethingElse110[1] * Other110 / Another110
.
.
.
Calculation1120 = Something1120 + SomethingElse1120[1] * Other1120 / Another1120
Or the same example in a more conceptual way:
for n = 10 to 112
Calculation(n*10) = Something(n*10) + SomethingElse(n*10)[1] * Other(n*10) / Another(n*10)
How does it work in Pine Script V5, instead of making them manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果可以将它们放在数组中,则可以使用循环。
If you can put those in an array, you can use a loop.