JoParticipant
New
Hi! Am a novice to coding with ProScreener and have been trying to build a simple code to get started but am getting error messages which I can’t seem to fix – would appreciate any assistance. I am also trying to build in a downarrow and uparrow.
I am trying to look for a higher high over 360 trading periods (hours) and seeking a close that is higher than the weighted moving average over 90 days – this is indicated with an uparrow (which would sit above the displayed data) and for the opposite – a lower low over 360 trading periods (hours) and a close that is lower that the weighted moving average over 90 days – indicated with a downarrow(which would sit above the data)
I have cut and pasted some code from the website but still not working. In particular the error codes are around the brackets used in this part of the formula – DRAWARROWDOWN(barindex+1, i1).
The code I have built so far looks like this:
i1 = close
i2 = highest [360](close)
i3 = Average[90,2](close)
if i1<i2 and i1<i3 then
DRAWARROWDOWN(barindex+1,close) coloured(255,10,10)
elsif i1>i2 and i1>i3 then
DRAWARROWUP(barindex+1,close) coloured(10,255,10)
endif
RETURN
Graphical instructions like DRAWARROW are only compatible with prorealtime v10.3, that’s the reason why you are getting syntax error at lines 6 and 8.