Could any one please help me create a scanner for the following conditions?

1: The first 5-minute/15-minute candle should be a Doji, and the stock should open above the CPR.

2: The first 5-minute/15-minute candle should be a Doji, and the stock should open below the CPR.

verify once

interesting