Hi,
I wrote a script and want to draw just the last 10 values on the chart.
When I have
if (getCurrentBarIndex()>-10) return(v); else return(null);
in the main, it normally keeps drawing the study when new bars are added.
So I decided to use setBar(Bar.Value,-10,null) and this causes a crash.
I just want to erase the -10th. bar's value from the chart on new bars.
Any idea to do that?
thanks,
I wrote a script and want to draw just the last 10 values on the chart.
When I have
if (getCurrentBarIndex()>-10) return(v); else return(null);
in the main, it normally keeps drawing the study when new bars are added.
So I decided to use setBar(Bar.Value,-10,null) and this causes a crash.
I just want to erase the -10th. bar's value from the chart on new bars.
Any idea to do that?
thanks,
Comment