Using array for xshift

PlotOHLC(rangeH, rangeH, rangeL, rangeL, "range", colorGrey50, styleCloud, Null, Null, -(8));

In my code rangeH, rangeL are known at a later point. When this occurs I am plotting a cloud over the range. My xshift is an array. It changes from signal to signal. Right now I am using -8 as a hardcode. Is there a workaround to use xShift of array type?

xshift represents the amount of shift for ENTIRE chart. So it is scalar. For array (bar-by-bar) shifting of DATA you can use Ref() function.

Tomasz I am plotting the grey ohlc cloud when red astrix occurs. I know the size and shape of ohls only at that point. How can i use ref in this case?