=================== Hourly MACD - Close =================== This indicator can be used on 1, 5, 10, 15, 20 and 30 minute charts to display the value of a 60 minute MACD and signal line. ---8<--------------------------- {Hourly MACD - Close} {© 2003 Roy Larsen} {rlarsen@man.quik.co.nz} {use on intraday charts} D:=Input("Signal periods (Hours)",1,19,9); Q:=Input("1=Dynamic last bar, 2=Sample only @ end of hour",1,2,1); {1=dynamic last hour, MS compatible} {2=sample end of hour when available} A:=Minute()=0; B:=Hour()<>ValueWhen(2,1,Hour()) OR DayOfWeek()<>ValueWhen(2,1,DayOfWeek()); F:=LastValue(Cum(1))=Cum(1); X:=0.15; Y:=0.075; D:=2/(D+1); J:=If(A,1,If(Alert(A,2)=0 AND B,2,0)); J:=If(F AND J=0 AND Q=1,1,J); K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C))); M:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-X)+K*X); N:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-Y)+K*Y); R:=M-N; Z:=If(Cum(J>0)=1,R,ValueWhen(1,J,PREV)*(1-D)+R*D); R; {MACD} Z; {signal} ---8<--------------------------- http://www.metastocktips.co.nz/