#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

# Scaning within timeframes

edited September 2016 in Scanning
OK this whole time thing eludes me:

Is there some simple way to scan time frames, like this?

Low X sma(20) in the last 10 days
OR Better yet
Force(13) NOT < 0 since RSI(14) X 30

• mod
edited September 2016 Answer ✓
For low x sma in the last ten days, there would be two states for low versus sma. Ten days ago the low was below the 10 days ago sma, and today, the low is above today's sma. For those two conditions to be true, the low had to cross above the sma at some point.

For the second condition - Force and RSI, you have to give the scan engine a specific number of periods - a range - to look at. It can't figure out on its own when RSI x 30 - you have to give it a range of dates to look at.

So you would have to go back to your charts and determine what's the maximum look back you want for RSI to have crossed above 30 - 5 days, 20 days, etc. Then you would write a condition for RSI below 30 some number of days ago, and RSI above 30 now - so (like the low vs sma) the crossover happened some time in between. Then test for Force above zero the entire time [min(..., Force(..)) > 0], or just today, or look for a similar Force crossover in the same time period.
It may not get the exact condition you have specified, and it may miss some situations you might like, but you should get enough hits and most hits should be similar to what you are looking for.

The alternative is to write a much more complex scan that specifies the conditions for RSI and Force for each day of the look back period.

If you get stuck, post what you have.