Hi there,
I have been struggling with my ProScreener to correctly predict and show me relevant stocks that hit my 6 criteria on the 1 hour mark.
Where could I go to on the platform to have the code ‘reviewed’ to fix it?
At times the problem is that it returns zero results (which is incorrect when I check) and other times it leaves out shares that should be in the selection.
I am comfortable with my logic (so far) but it seems that my sequence of conditions may incorrectly throw shares out or even give zero result?
In essence I am trying to find out 6 scenarios that should happen at the same time and to look back if this was the case over the last 9 candlesticks/intervals.
Do you know where I am possibly going wrong here please?
once periods = 9 //last 9 bars
myvol = Volume
c1 = myvol >100000
medprice = medianprice
c2 = medprice > 3
mymacd = MACD [12,26,9] (close)
c3 = mymacd = 0
myao = (Average[5](MedianPrice)-Average[34](MedianPrice))
c4 = myao =0
mystoch = Stochastic [14,3]
c5 = mystoch =2
mymfi = Moneyflowindex [y]
c6 = mymfi >x
if summation [period] [c1 and c2 and c3 and c4 and c5 and c6] then
endif
Screener [trade]
c3, c4 and c5 are unlikely to happen individually, altogether… I think it’s impossible.
How can both MACD and AO be exactly 0 at the same time with the addition of Stochastic having to be 2?
They are usually used with relational operators > or < or >= or <=, just = is very hard to occur!
Moreover, try removing ONCE from line 1.
Hi Roberto,
Thanks, you are exactly right. It has to be > or < but even when I did that then it seemed that the code wouldn’t ‘read’.
Even if the metrics are > for MACD and AO, and the StochRSI >50 (which should be logically correct then) could it be that the format of how I am arranging my code is confusing the screener?
Thanks.
Hi Roberto,
Just to close this out – I spent some time this morning just going through the logic. I seem to have figured it out. The sequence of logic was off, and I rather removed the MFI criteria as it was messing up the entire code.
Thanks for your assistance though, I think this thread is now solved.
Cheers,
Lial
There are some errors, the summation conditions must be under parenthesis (you used brackets) and the Trade variable is not defined anywhere?