松文脚本如何如果然后
我有一个声明(如果x,则y)。如何添加第二个动作(如果x进行y和z)?
count = 0
if (x)
do y AND count += 1
另外,您会指定计数类型吗?pine脚本的等效=+是什么? 是否有一个可以使用代码的地方,例如沙盒/控制台(类似于JavaScript)。
I have a statement (if x then do y). How can I add a second action (if x then do y AND z)?
count = 0
if (x)
do y AND count += 1
Also, would you specify the type for count, and what is pine script's equivalent of =+?
Is there a place to play around with code, like a sandbox/console (similar to JavaScript).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
另外,除非是
na
,否则您是否会指定不必 。以下所有内容都是正确的:=在Pine脚本中与其他语言相同。
Pine脚本中没有控制台。阅读 this 获得调试帮助。
All actions in the if block will get excuted:
You don't have to, unless it's
na
. All of the following is correct:+= in pine script is the same as in other languages.
There is no console in pine script. Read this to get help with debuging.
如果或下一个需要关闭循环,则无休止。
只需谨慎对待垂直线块即可。
因为垂直线表示查询中的if或其他下一个。
No end if or next needed for close the loop.
Just be carefull about vertical line blocks.
Because vertical lines represents end if or next in the queries.