I'm writting a look ahead indicator and I want to plot to the right of Bar (0) - the current bar. Is there a way to plot to Bar (-1) ?
...bob
...bob
function preMain(){
setPriceStudy(true);
}
function main(){
var Avg = sma(10);
var Offset = 5;
var AvgVal = Avg.getValue(-Offset);
for (var x=1; x<=Offset; x++){
drawLineRelative(x-1,Avg.getValue((x-Offset)-1),x,Avg.getValue(x-Offset),PS_SOLID,1,Color.blue,"plot"+x);
}
return AvgVal;
}
Comment