I have three studies plotting a line on the price chart. When a new bar comes in, each study does its calculations, and then plots a line extension from the old bar to the new bar. I do this using
drawLineRelative(-j,aWghtPrice[j],-(j-1),aWghtPrice[j-1],PS_SOLID,2,Color.blue,gID());
So, I end up with a bunch of different "lines." I come up with the tag identifier using
function gID() {return grID++};
Now I want to remove only the line from the second study and refresh it by redoing all the calculations and replotting. I could keep track of all the individual gID() numbers for this line and then removing the line with removeLine(...) inside some loop.
But, isn't there an easier way to remove just this one line? The clearLines() statement would remove all the lines -- even those from the other two studies. Right?
drawLineRelative(-j,aWghtPrice[j],-(j-1),aWghtPrice[j-1],PS_SOLID,2,Color.blue,gID());
So, I end up with a bunch of different "lines." I come up with the tag identifier using
function gID() {return grID++};
Now I want to remove only the line from the second study and refresh it by redoing all the calculations and replotting. I could keep track of all the individual gID() numbers for this line and then removing the line with removeLine(...) inside some loop.
But, isn't there an easier way to remove just this one line? The clearLines() statement would remove all the lines -- even those from the other two studies. Right?
Comment