CapitalGoodsRef = Ref(CapitalGoods,-Lookback);
CapitalGoods_Delta = CapitalGoods - CapitalGoodsRef; // Price delta
in Lookback periods
CG_Perc_Delta1 = CapitalGoods_Delta *100 / CapitalGoodsRef; // %
delta
CapitalGoodsVal1 = EMA((CG_Perc_Delta1 - Perc_IndexDelta1),Smooth); // % delta wrt index
Offset = Ref(CapitalGoodsVal1,-Bars);
// value at first visible bar
CapitalGoodsVal2 = CapitalGoodsVal1 - Offset; // Shift values to make all equal to zero at start of
chart
Offset2 = CapitalGoodsVal1[SelectedValue(BarIndex())];
// value at specified Lookback bars
<==== Problem
area
CapitalGoodsVal3 = CapitalGoodsVal1 - Offset2; // Converge all lines at -Lookback
Bars
------------------------------------------------------------------------------------------------------------------------------------------------------
This code works well on my primary
computer.
When I load it to my backup (laptop) I
get index out of range error.
Appreciate any
feedback
Ara