input Length = 20;
def Strt = BarNumber() - Length;
Plot Start = if barnumber()==Strt then MovAvgP else double.NaN;
Start.SetPaintingStrategy(paintingStrategy = PaintingStrategy.TRIANGLES);
The above code doesn't work but once i change the strt to a number "Constant" instead of a mathmatical operation it works. Can anyone explain why this happens and what is the work around please?
It only plots when I do the following
input Length = 20;
def Strt = BarNumber() - Length;
Plot Start = if barnumber()==333 then MovAvgP else double.NaN;
Start.SetPaintingStrategy(paintingStrategy = PaintingStrategy.TRIANGLES);
so it seems BarNumber() doesn't work arguments only with constants
thanks in advance
def Strt = BarNumber() - Length;
Plot Start = if barnumber()==Strt then MovAvgP else double.NaN;
Start.SetPaintingStrategy(paintingStrategy = PaintingStrategy.TRIANGLES);
The above code doesn't work but once i change the strt to a number "Constant" instead of a mathmatical operation it works. Can anyone explain why this happens and what is the work around please?
It only plots when I do the following
input Length = 20;
def Strt = BarNumber() - Length;
Plot Start = if barnumber()==333 then MovAvgP else double.NaN;
Start.SetPaintingStrategy(paintingStrategy = PaintingStrategy.TRIANGLES);
so it seems BarNumber() doesn't work arguments only with constants
thanks in advance
Last edited by a moderator: