====================== View Offset Last Value ====================== This indicator demonstrates how to plot the last value of a signal that is usually displaced to the right by one or more bars. The example used here is the Bill Williams 'Chaos Red' indicator, which is a Wilders smoothed signal delayed by five bars. ---8<--------------------------- {View Offset Last Value} {rlarsen@man.quik.co.nz} Offset:=Input("Offset Periods (Delay)",0,20,5); Periods:=Input("Display Periods" ,2,20,5); {Chaos Red} {Bill Williams code} {Alligator Red Balance Line - Teeth} {8 bar smoothed average offset 5 bars} ChaosRed:=Ref(Wilders(MP(),8),-5); Signal:=ChaosRed; {sample signal} LastBar:=LastValue(Cum(1)-(Periods-1))=Cum(1); ValueWhen(1,LastBar,LastValue(Signal)); Ref(Signal,-Offset); {offset sample signal} ---8<--------------------------- http://www.metastocktips.co.nz/