Good morning all. Can I get some help with setting up an ADX screener please?
Criteria-
ADX crosses +DM from below 20 for a bullish screener (with +DM already above -DM) and screener remains for 3 candles
ADX crosses -DM from below 20 for a bearish screener (with -DM already above +DM) and screener remains for 3 candles
Your help is much appreciated.
Thank you.
KR
That code should do the trick:
iadx = ADX[14]
plus = DIplus[14](close)
minus = DIminus[14](close)
c1 = summation[3](iadx crosses over plus and plus>minus)>0
c2 = summation[3](iadx crosses over minus and plus<minus)>0
screener[c1 or c2]
(not tested, please test it and make feedback here).
Hey @Nicolas, I tested the above screener but it only shows instruments where the ADX is leaving the DMI instead of entering it. I’ve attached a photo of what I had suggested. So instead of screening for instruments where the ADX crosses from outside and stays between D+ and D- as shown in arrows (1) and (2), it shows (3), if I make sense. Thanks.