Hi All,
Can somone please advise how to add a criteria that filters according to the average volume of the last 90 days?
I tried the following however it did not work:
avgv = average[90](volume)
criteria = avgv >300000
Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
Thank you 🙂
Your code is correct, it depends where you use it.
If you add the last line:
Return criteria
it will return a signal when average volume > 300K.
What do you mean by “it did not work”?
Hi There,
I tried:
REM Calculate the RSI indicator on 14 hourly bars
myRSI = RSI[14]
REM Our filter condition: RSI < 30
Filter = myRSI < 30
REM Sorting criteria: myRSI
SCREENER [ Filter ] (myRSI AS "RSI")
avgv = average[90](volume)
criteria = avgv > 300000
Return criteria
But it produced the following error message:
!Syntax error: line 12, character 16
The keyword RETURN is only for indicator programming (ProBuilder)
You cannot use both SCREENER and RETURN, one is for screeners, the latter for indicators.
You have to tell us what you want.
An indicator is assumed since you posted in the ProBuilder support forum.
I think you want a screener, try this one:
REM Calculate the RSI indicator on 14 hourly bars
myRSI = RSI[14]
REM Our filter condition: RSI < 30
Filter = myRSI < 30
avgv = average[90](volume)
criteria = avgv > 300000
REM Sorting criteria: myRSI
SCREENER [Filter and criteria] (myRSI AS "RSI")
I moved your topic to the ProScreener support.