Vultran
The first month of any quarter can be found by dividing (Month()-1) by 3 and testing the fractional result for zero..
Qstart:=Frac((Month()-1)/3)=0;
The first bar or leading edge of the first month in each quarter is then found by testing the current bar for TRUE (Qstart) and the previous bar for FALSE (Qstart=0). The use of either Alert() or ValueWhen() is preferable to Ref() when testing the logical state of the previous bar for the simple reason that my suggested alternatives do not imbed an N/A bar on bar one. To be fair, though, neither Alert() nor ValueWhen() can produce a result on bar one either
Qstart AND Alert(Qstart=0,2);
Qstart:=Frac((Month()-1)/3)=0;
Qstart {=TRUE} AND Alert(Qstart=FALSE,2);
Variations on the theme are as follows.
Qstart:=Frac((Month()-1)/3)=0;
Qstart * Alert(Qstart=0,2);
Qstart:=Frac((Month()-1)/3)=0;
Qstart AND ValueWhen(2,1,Qstart)=0;
Qstart:=Frac((Month()-1)/3)=0;
Qstart * Ref(Qstart,-1)=0; {NOT recommended}
Roy
MetaStock Tips & Tools