/*[[ Name := Efficiency Author := OlegVS Link := olegvs2003@yahoo.com Separate Window := Yes First Color := Blue First Draw Type := Histogram First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Histogram Second Symbol := 217 ]]*/ Variable : shift(0),value(0); SetLoopCount(0); // loop from first bar to current bar (with shift=0) For shift=Bars-1 Downto 0 Begin value=((H[shift]-L[shift])+(H[shift+1]-L[shift+1])+(H[shift+2]-L[shift+2]) +(H[shift+3]-L[shift+3])+(H[shift+4]-L[shift+4])+(H[shift+5]-L[shift+5]) +(H[shift+6]-L[shift+6])+(H[shift+7]-L[shift+7])+(H[shift+8]-L[shift+8]))/(C[shift]-O[shift+8]); If value>0 then SetIndexValue(shift,1/value); If value<0 then SetIndexValue2(shift,1/value); End;