What is the equivalent of console.log in pine-script?

前端 未结 4 710
谎友^
谎友^ 2020-12-30 23:08

How does one console.log variables, or the results of functions in pine-script? I\'d like to convert a pine-script script into j

4条回答
  •  被撕碎了的回忆
    2020-12-30 23:42

    This answer is now outdated. Please consult other more recent answers.


    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.

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

提交回复
热议问题