AFL for 3 Doji Candlesticks In Sequence
This formula finds stocks that have 3 doji candlestick patterns in sequence and where the 2 previous doji candlesticks are around the same price point. It can be run as an exploration or scan.
Script:
function CheckNear (gia1, gia2, tyle)
{
TyleChenhLech = (abs (gia1 – gia2))/gia2;
result = IIf (Tylechenhlech <= tyle, True, False);
return result;
}
DKKL = V > 100000; // NEN CON V LON SE CO GIA TRI HON
DKDJ = CheckNear (O, C, 0.005) AND CheckNear (Ref (O, -1), Ref (C, -1), 0.005) AND CheckNear (Ref (O, -2), Ref (C, -2), 0.005);
DKDINGANG = CheckNear (C, Ref (C, -1), 0.005) AND CheckNear (C, Ref (C, -2), 0.005);
Buy = DKKL AND DKDJ AND DKDINGANG;
Filter = Buy;