pine-script 中 console.log 的等价物是什么? [英] What is the equivalent of console.log in pine-script?

查看:52
本文介绍了pine-script 中 console.log 的等价物是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个console.log variables,或者pine-script中函数的结果如何?我想将 pine-script 脚本转换为 javascript,并且我想验证我正在转换的脚本是否与原始脚本相同.如果此功能不存在,则欢迎任何变通方法.谢谢!

How does one console.log variables, or the results of functions in pine-script? I'd like to convert a pine-script script into javascript, and I'd like to verify that the script I'm converting is the same as the original. Any work arounds are welcome if this functionality does not exist. Thanks!

推荐答案

这个答案现在已经过时了.请参考其他最近的答案.


无法将 pine-script 中的文本或变量打印到任何形式的控制台".但是您可以使用绘图打印每个刻度上方或下方的非常短的文本.但是,文本是静态的,您不能使用变量来更改它.


There is no way to print text or variables in pine-script to any form of "console". But you can use plot to print, very short text above or below each tick. The text, however, is static and you cannot use variables to change it.

您还可以使用各种技巧在图表窗口非常有限的指标字段(左上角)中显示值.或者将线条和绘图移出图表的可见区域,但仍能看到轴突出显示.

You can also use various tricks to show values in the very limited indicator fields (on top-left) of the chart window. Or move lines and plots out of visible are of chart, but still see the axis highlights.

请查看他们的 Wiki 并查阅其他用户的 1000 多个脚本以了解有关如何操作的详细信息.

Please check their Wiki and consult the 1000's of other user's scripts to find out the details on how to do it.

这篇关于pine-script 中 console.log 的等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆