#### 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.

# Weekly Positive Divergence

[[ type = stock] or [ type = index] or [symbol starts with '\$']]and [country is US]
and [[weekly close < weekly min(5,weekly close)] or [weekly close < weekly min(10,weekly close)] or [weekly close < weekly min(15,weekly close)]]

and [[weekly CMF(20) > weekly max(5,weekly CMF(20))] or [weekly CMF(20) > weekly max(10,weekly CMF(20))] or [weekly CMF(20) > weekly max(15,weekly CMF(20))]]

and [ATR(14) > 1.50]

#Help? Nothing comes up..

• mod
edited July 2016
Hi @daniel_fromcebu , welcome back.

It's not a grammatical error because it passes syntax. There are a lot of conditions, which sometimes causes no hits. But, I think it's a logic error.

Try this first:

Modify ALL the max and min conditions with "1 week ago".

For example:

weekly close < 1 week ago weekly min(5, weekly cmf(20))

If this week's close is NOT the min value, then it can't be less than the min value, it has to be greater.

If this week's close IS the min value, then it cannot be less than itself, it would have to be equal.

So there is no circumstance where this week's close can be LESS THAN the min close, which is what you are asking for.

Same for the max values, the current value cannot be greater than the current max value, only equal or less. So compare the current value to the prior period's max.