Help me to code the below strategy

Daily Chart
Buy if previous candle opening and lowest price is same
Sell at market value