dimanche 27 septembre 2020

PineScript Question - How to test calculations/debugging

I'm currently converting an old Basic program into Pine Script. In Basic it is easy to output variable's values to test they are correct, using the PRINT statement. Would you be able to advise how I can see the values of calculations in Pine Script, please? Here is an example:

fn_z_to_v(c,u) =>
u = abs(c)
z3 = int(u)
q = int(z3 / 30) + 1
z7 = int(fnw((z3 / 30 - int(z3 / 30)) * 30))

It should be noted that these are intermediate calculations and are not intended for display in a chart. Their values would make no sense in the context of time or price.

How might I see the values of u, z3, q and z7 (assuming I correctly pass the values c and u to the function and that the function fnw is correctly formed)?

Thanks,

Aucun commentaire:

Enregistrer un commentaire