Hi there, I’ve had issues with screeners and using the ‘Average’ command before (apparently ProScreener doesn’t like the second argument in the parenthesis so much…), but thought they would have been fixed by now. Can anyone spot the problem with this (doesn’t return any results on any list of instruments)?
HullP1 = 6
RSIper = 6
MyRSI = RSI[RSIper](Close)
HullMA1 = Average[HullP1, 8](Close)
IF (HullMA1 > HullMA1[1]) AND (HullMA1[1] < HullMA1[2]) THEN
HullMA1turnup = 1
ELSE
HullMA1turnup = 0
ENDIF
Hullturnup = HullMA1turnup OR HullMA1turnup[1] OR HullMA1turnup[2] OR HullMA1turnup[3]
SCREENER[Hullturnup](MyRSI)
It seems ProScreener will only return results up to the value of 6 as the MA type…
Even when I manually calculate the Hull MA I don’t get any results, even though translating to an indicator to obtain e.g. a histogram when the condition is true works just fine:
HullP1 = 6
RSIper = 6
MyRSI = RSI[RSIper](Close)
a1 = (HullP1/2)-((HullP1 MOD 2)/2)
b1 = SQRT(HullP1) MOD HullP1
c1 = WeightedAverage[a1](Close)
d1 = WeightedAverage[HullP1](Close)
HullMA1 = WeightedAverage[b1]((2*c1)-d1)
IF (HullMA1 > HullMA1[1]) AND (HullMA1[1] < HullMA1[2]) THEN
HullMA1turnup = 1
ELSE
HullMA1turnup = 0
ENDIF
SCREENER[HullMA1turnup](MyRSI)
Doesn’t fill me with confidence in ProRealTime as a platform if simple things like this can’t be programmed. I know v11 is coming out soon with a designated HullAverage instruction, but still…
Thanks in advance for your help.
I get ProOrder / Auto-Systems working okay for MA[20,7] and MA[20,8] but it seems MA type 7 and 8 are not supposed to work in PRT v 10.3.
Maybe it is just as a Screener that MA Type 7 and 8 don’t work in V 10.3
MA type 7 and 8 do work in PRT v 11 … so I am told, as I don’t have v 11.
Install yjis indicator on your chart, to find out if there have been signals before:
HullP1 = 6
//RSIper = 6
//
//MyRSI = RSI[RSIper](Close)
a1 = (HullP1/2)-((HullP1 MOD 2)/2)
b1 = SQRT(HullP1) MOD HullP1
c1 = WeightedAverage[a1](Close)
d1 = WeightedAverage[HullP1](Close)
HullMA1 = WeightedAverage[b1]((2*c1)-d1)
IF (HullMA1 > HullMA1[1]) AND (HullMA1[1] < HullMA1[2]) THEN
HullMA1turnup = 1
ELSE
HullMA1turnup = 0
ENDIF
RETURN HullMA1turnup
Yes I did that thanks, Roberto, as alluded to in my post (“even though translating to an indicator to obtain e.g. a histogram when the condition is true works just fine”). I can confirm it works fine as an indicator, yet ProScreener doesn’t pick it up…
The screener is designed for cryptos so am not so interested in backtesting on ProOrder, GraHal, but thanks for your observation.
With HULL periods = 100 it works.
I also added line 19 and modfied line 20 to make a signal valid for longer than just one bar:
LookBack = 1 //make it valid for how many bars you may need
SCREENER[summation[LookBack](HullMA1turnup)](MyRSI)
Thanks for that, Roberto. A 100-period lookback is not ideal – it should work for all (positive/non-zero) values.
I have tried the Summation command before to detect signals from previous bars, but for the code I posted above that did not work either.
A 100-period lookback is not ideal
What myself and Roberto were trying to provide is information to show if Hull MA works in a ProScreener as your original post suspected that Hull MA didnt work in ProScreener.
Roberto’s code / results proves that HullMA does work in ProScreener.
Yes, but only with certain lookback periods (beyond what is a high initial value). I think most people would regard that as sub-optimal.
I think most people would regard that as sub-optimal.
Maybe and we take / agree your point, but Roberto code shows that ProScreener can read the Hull MA type 8 … which your original post read / doubted that HullMA could be used at all at any lookback period / in any way at all in ProScreener?.
I guess now we are onto the next phase of coding … to get a Screener that gives you want you want (now we know / have proven that Hull MA works in ProScreener).