Hi,
Can someone help me to program a scanner to find a “holy grail” setup. I just can’t get it right.
I want to scan the following:
- ADX(14) is higher than 30
- ADX(14) in this period is higher than ADX(14) in the last period
- Current bar high is higher than SMA(20) and current bar low is lower than SMA(20)
I was successful with the ADX, but how do I program the bar high and lows?
Regards,
Johan
This is the piece of code you are looking for (I did not test it):
.
.
.
AdxValue = ADX[14](close)
MAvalue = Average[20](close)
.
.
.
c1 = AdxValue > 30
c2 = AdxVal > AdxVal[1]
c3 = high > MAvalue
c4 = low < MAvalue
IF c1 AND c2 AND c3 AND c4 THEN
.
.
.
ENDIF