MetaStock -> Tools -> Indicator Builder -> New Copy and paste formula below. ========== Pattern 01 ========== ---8<--------------------------- { Basic Pattern 01 - Consecutive Lower Closes } { Historically profitable in 81% of ASX100 stocks and the SPI } { ©Copyright 2004 Jose Silva } { For personal use only } { http://www.metastocktools.com } x:=Input("Consecutive Lower Closes - Entry", 0,21,5); y:=Input("Consecutive Higher Closes - Exit", 0,21,5); delay:=Input("Entry and Exit delay",0,5,0); plot:=Input("signals: [1]Clean, [2]All", 1,2,1); In:=Sum(CRef(C,-1),y)=y; Init:=Cum(In+Out>-1)=1; InInit:=Cum(In)=1; flag:=BarsSince(Init OR In)