Gary, Ken, Mike & All ; Here is the corrected 'Morning Star' Scan.
IMO, this looks for the 'ideal' morning star pattern. Candlestick patterns are very subjective and not an exact science. As such it is difficult to write a scan that will identify all patterns that, to some meet, the pattern criteria.
good luck to all
Roy
Input"issue List.lst"; Output"!Morning DOJI Star.lst"; Integer i,Start,End,NumDays; //For back test loop Start:=-0; // Set to Oldest day for loop End:=-0; // Set to Most recent day for loop NumDays:=0; // Set to number of days for MovAvg etc. DaystoLoad((Start*-1)+10); For i=start to end DO //Black Body first day If Close(i-2)<Open(i-2)And //Black body (Open(i-2)-Close(i-2))>Open(i-2)*.03 //Longer Body Then //Gapping Body second day If Open(i-1)<=Close(i-2)and Open(i-1)<=Open(i) Then If //Doji body second day Abs(Close(i-1)-Open(i-1))<Open(i-1)*.01 //DOJI body Then //White body third day If Close(i)>Open(i)and //White body Close(i)-Open(i)>Open(i)*.03 //Longer body Then // Down Trend Previously If Close(i-1)<Close(i-2)and Close(i-2)<Close(i-3)and Close(i-3)<Close(i-4)and Close(i-4)<Close(i-5)//and //Close(i-5)<Close(i-6) Then PrintLn Symbol,",",Date(i),",","Morning Star" ,",","Reversal at Bottom"; EndIf; EndIf; EndIf; EndIf; EndIf; Next i; |