Hi there,
I am trying to have a very simple screener identifying stocks with this configuration:
- oversold Weekly/Daily Stoch (the K% line)
- growing Weekly/Daily MACD (not the Signal line)
But for some reason, it does not take the parameter of the MACD into account ;
Does anybody see why?
Thanks !!
Chris
<pre class=”lang:probuilder decode:true “>REM Condition 1: Stoch en survente et en croissance + MACD weekly < 0 et croissant
TIMEFRAME(WEEKLY)
KW=STOCHASTIC[14,3]
StochWeek = KW<25
CroissStochWeek = KW>(KW)[1]
MW=MACD[12,26,9]
CroissMACDWeek = MW>(MW)[1]
MiniVolume = volume>10000
REM Condition 2: Stochastic daily < 25
TIMEFRAME(DAILY)
KD=STOCHASTIC[14,3]
StochDay = KD<25
CroissMACDDay = MACD>(MACD)[1]
CroissStochDay = KD>(KD)[1]
SCREENER[StochWeek and CroissStochWeek and CroissMACDWeek and MiniVolume and StochDay AND CroissMACDDay and CroissStochDay]
The line
CroissMACDDay = MACD>(MACD)[1]
is incomplete since it lacks due parameters embedded within brackets, didn’t ProScreener warn you?
Hi Robert,
Thanks for your reply; no warning popped up.
I don’t get what is improper to be honnest (keep learning the code);
Is this a more correct coding? Thanks
REM Condition 1: Stoch en survente et en croissance + MACD weekly < 0 et croissant
TIMEFRAME(WEEKLY)
KW=STOCHASTIC[14,3]
StochWeek = KW<25
CroissStochWeek = KW>(KW)[1]
LigneMACDW = ExponentialAverage[12](Close) - ExponentialAverage[26](Close)
CroissMACDWeek = LigneMACDW>(LigneMACDW)[1]
MiniVolume = volume>10000
REM Condition 2: Stochastic daily < 25
TIMEFRAME(DAILY)
KD=STOCHASTIC[14,3]
StochDay = KD<25
LigneMACDD = ExponentialAverage[12](Close) - ExponentialAverage[26](Close)
CroissMACDDay = LigneMACDD>(LigneMACDD)[1]
CroissStochDay = KD>(KD)[1]
SCREENER[StochWeek and CroissStochWeek and CroissMACDWeek and MiniVolume and StochDay AND CroissMACDDay and CroissStochDay]
I don’t know what you ask about Macd, the second code is different from the first one!
The first one had an incorrect line, how could you run it?
To me the second version expressed the same idea of a MACD line (not the signal) being growing as a condition; I assure you there was no error mentioned in the first code;
Can you precise what exactly was wrong for my knowledge? Thanks
Macd cannot be written MACD, it’s an error. It should be written
MACD[12,26,9]
as you did on the Weekly TF, that’s why I can’t figure out how it could run. I copied it to my ProScreener and I was warned about the error!
In your second version, there is no reference to the MACD being < 0, perhaps you should add, on the Weekly/Daily (where you want to check it) chart
x = LigneMACDW < 0 //or any other name instead of x
As it is now, applied to ALL instruments, on a 1-minute TF, it does not return any occurrency.
REM Condition 1: Stoch overbought and decreasing + MACD weekly decreasing
TIMEFRAME(WEEKLY)
KW=STOCHASTIC[14,3]
StochWeek = KW>80
CroissStochWeek = KW<(KW)[1]
LigneMACDW = MACD[12,26,9]
CroissMACDWeek = LigneMACDW<(LigneMACDW)[1]
MiniVolume = volume>10000
wconditions = StochWeek and CroissStochWeek and CroissMACDWeek and MiniVolume
REM Condition 2: Stoch overbought and decreasing + MACD daily decreasing
TIMEFRAME(DAILY)
KD=STOCHASTIC[14,3]
StochDay = KD>80
LigneMACDD = MACD[12,26,9]
CroissMACDDay = LigneMACDD<(LigneMACDD)[1]
CroissStochDay = KD<(KD)[1]
dconditions = StochDay AND CroissMACDDay and CroissStochDay
SCREENER[wconditions and dconditions]
Here is the code working now !
thanks for your help Robert !