/*[[ Name := DayImpuls Author := Copyright © 2005, HomeSoftware Corp. Link := spiky@sinet.spb.ru Notes := Индикатор предназначен для определения тенденции рынка за последние 24 часа на графиках М15 Separate Window := Yes First Color := Yellow First Draw Type := Line First Symbol := 217 Use Second Data := No Second Color := Red Second Draw Type := Histogram Second Symbol := 218 ]]*/ Input : per(14),d(100); Variables : shift(0),i(0),imp(0),mBar(0); SetLoopCount(0); // loop from first bar to current bar (with shift=0) For shift=Bars-1 Downto 0 Begin SetIndexValue(shift,0);SetIndexValue2(shift,0); End; mBar=d*per; for shift=mBar downto per Begin imp=0; for i=shift downto shift-per Begin imp=imp+(O[i]-C[i]);end; imp=round(imp/point);if imp==0 then imp=0.0001; if imp!=0 then Begin imp=-imp;SetIndexValue(shift-per,imp);end;end;