/*[[ Name := T Author := Copyright © 2005, MetaQuotes Software Corp. Link := http://www.metaquotes.net/ Separate Window := Yes First Color := Blue First Draw Type := Line First Symbol := 217 Use Second Data := No Second Color := Red Second Draw Type := Line Second Symbol := 218 ]]*/ Variable : shift(0); SetLoopCount(0); // loop from first bar to current bar (with shift=0) For shift=Bars-1 Downto 0 Begin SetIndexValue(shift, 0); End;