I am testing some logic and can't see where my gap is, and I would like to be able to display the variable value at each bar. Is there a way to do something like a "DrawText" or similar with a variable?
Rename
You can pass any string to DrawText. What's the problem?
For "at each bar" use WriteToDebugLog and then see the Debug log.
CODE:
//example: WriteToDebugLog($"{idx}\t{myVariable:N4}")
I think the best way is to create a TimeSeries, plot the TimeSeries, and set the values of your variable into the TimeSeries on each bar.
I like the method discussed in Post #3 the best. If you're using that approach, you can go to the View menu and open View > Data Panel to get a look and all the TimeSeries values on the Chart, which is handy.
If there's a specific bar you want to look at, then try DrawBarAnnotation as well. You could put that in a FOR loop and annotate every single bar, but that would be kind of messy.
If there's a specific bar you want to look at, then try DrawBarAnnotation as well. You could put that in a FOR loop and annotate every single bar, but that would be kind of messy.
Thanks all, I figured out that the variable_name.toString() in DrawText was what I needed.
I'll try the TimeSeries next - that would also be helpful.
I'll try the TimeSeries next - that would also be helpful.
Your Response
Post
Edit Post
Login is required