RafaParticipant
Senior
Dear all,
I have downloaded the PRT_Price Momentum Oscillator, and when I try to code a simple screener like Line Crosses Over PMO, it gives me an error “Internal server error” and is not the first time and the first indicator.
Any ideas?
Cheers
Topic moved to English forum screener section.
I spotted the problem, caused by the used of the choice made of the moving average type in the “average” instruction (set to mode 1 which is Exponential one = EMA). I changed the code to the “exponentialaverage” instruction instead and it works correctly now.
//PRC_Price Momentum Oscillator
//28.09.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
length1=35 // "First Smoothing"
length2=20 //"Second Smoothing"
siglength=10 //"Signal Smoothing"
// --- end of settings
if barindex>1 then
i = (close/close[1])*100
sm1 = 2.0/length1
csf1=((i-100)-csf1[1])*sm1+csf1[1]
pmol2=csf1
sm2 = 2.0/length2
csf2=((10*pmol2)-csf2[1])*sm2+csf2[1]
pmol=csf2
//pmols=average[siglength,1](pmol)
pmols=exponentialaverage[siglength](pmol)
endif
test = pmol crosses over pmols or pmol crosses under pmols
screener[test]
I confirm that choosing the kind of moving average this way:
average[period,M]
Where M can be set with any of these values, to return the specific moving average calculation:
0 = SMA
1 = EMA
2 = WMA
3 = Wilder
4 = Triangular
5 = End point
6 = Time series
.. is not possible through ProScreener.