A request that was addressed to ProRealTime:
Please can you code the 2 following market scans:
Scan 1: Open of Yesterday – Close of 5 days ago < 50% (Higt of 5 days ago – close of Yesterday)
Scan 2: Open 5 days ago – close of Yesterday < 50% of range of last 5 days
Suggestion for an answer:
Scan 1: Open of Yesterday – Close of 5 days ago < 50% (Higt of 5 days ago – close of Yesterday)
timeframe(daily)
condition = (open[1]-close[5]) < 0.50*(high[5]-close[1])
screener[condition]
Scan 2: Open 5 days ago – close of Yesterday < 50% of range of last 5 days
timeframe(daily)
condition = (open[5]-close[1]) < 0.50*(highest[5](high)-lowest[5](low))
screener[condition]