Scan for stocks with lowest RSI and MACD


New member
Hi, Need to create a scanner for stocks with the following condition.

Find stock with the lowest RSI and MACD values. These lowest values should be in the range of +/-x bars from each other.

Following diagram is sample representation of aforementioned condition. Can someone please help with it? I tried to set it up using predefined option in ThinkOrSwim but couldn't get it right.



Well-known member
since the macd/rsi follow price you are doing the same thing as looking up the lowest price of the past year

TOS has a built in scan to find the lowest low (lowest price) of the past 52 weeks (bars).


Well-known member
You can confirm what I said @ZilluZim with the scan below. here is one of the 2 you requested since they do the same thing i just made it for your satisfaction.

MACD is at the lowest data point of the past 252 Days (set aggregation to day)
declare lower;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
def Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
plot scan= getminValueOffset(value,252) <1;

Similar threads