i am trying to use the drawtext method to plot the calculated level II data on the chart.
i have some print statements which print the information correctly in the output window.
so what i am trying, is to plot the same data on the chart from within the onmarketdepth method, the code compiles, but when i insert the indicator in the chart, i get one of the following error messages.
BarIndex needs to be greater/equal 0.
or
drawtext start barsago out of valid range 0 through -1 was 0.
how to get the data from onmarketdepth on the chart?

Comment