How to scan stock that catches DEMA 200 movement over time


New member
I am beginner for scan setting and this question may not be qualified, but please kindly let me know how we can do below:

GOAL: Catch the movement either going higher/lower compared to past
Example: Scan stocks that its DEMA 200 is lower than 1 minute ago, or vice versa moving higher than 1 minute ago.
Condition: 1. Time duration is not necessary be as 1 minute, but could past 5 minutes or any (if we can specify)
2. CDMA 200 price is not the matter, but catch the movement either go higher/lower from previous time (micro trend)
3. Even it is not necessary as DEMA, but any indicator that I can scan micro trend (movement from previous minute/minutes)

This is not the purpose for scanning the condition (price, T/F, above/below etc.) might be met at the specific time when scan function is executed, but the purpose to identify stock that has movement on any indicator for certain time duration.

It might sound not make sense for you as professional, but I just want to know if I can scan stock that I could see movement (price, or any indicator) over time.
Please help!
Last edited:


Active member
Yes, you could do that quite easily, if I am understanding what you're asking at least.

On a one minute chart, this would show you if the SMA is rising compared to one minute ago.
Change the 1 to a 5, and it will compare it to five minutes go, etc.
You could replace the SMA with any other indicator as well, generally speaking.

def SMA = SimpleMovingAvg(close,20);
plot Rising = SMA > SMA[1];

In fact, the problem would be that it is too easy, your scan is going to return like one point twenty one giga-results.
Last edited:

Similar threads