MetaStock -> Tools -> Indicator Builder -> New -> -> copy & paste complete formula between "---8<---" lines. ======================== Month's true start & end ======================== ---8<----------------------------------------- { Signals true start & end of month: confirms signal at start of following month, and signals last day of month in retrospect. Plot on weekly, daily or intraday charts. ©Copyright 2005-2006 Jose Silva The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { User input } EOM:=Input("Final month's end: [1]True, [2]Current (dynamic)",1,2,1); { Choice of Static/Dynamic last EOM signal } EOM:=If(EOM=2,Cum(1)=LastValue(Cum(1)), DayOfMonth()=31); { Start of month } nuMonth:=Month()<>Ref(Month(),-1) OR Cum(1)=2; { End of month } monthEnd:=PeakBars(1, -(nuMonth OR Cum(IsDefined(nuMonth))=1),1)=0 OR EOM; { Plot signals in own window } nuMonth;-monthEnd ---8<----------------------------------------- http://www.metastocktools.com