Relative Volume Rankings Error
Forums › ProRealTime English forum › ProScreener support › Relative Volume Rankings Error
- This topic has 12 replies, 3 voices, and was last updated 2 years ago by revstrat.
-
-
02/02/2022 at 4:34 PM #187370
Hi,
I am struggling to figure out why this simple screener isn’t working.
I called this indicator created by Nicolas (the Relative Volume version): https://www.prorealcode.com/topic/relative-volume-rvol/
Then, I would like to run a screen from the ones with the top values for the day. I get an error:
“Syntax error: line 3, character 30
Syntax Error in Assignment”Please assist. Would really appreciate it, thank you.
RVOL Rankings12345678910myRVOL = CALL "RVOL"c1 = myRVOL > 1c2 = volume > 10000criteria = myRVOLscreen = c1 AND c2screener [screen](criteria AS "Relative VOL")02/06/2022 at 10:34 AM #18765502/06/2022 at 2:21 PM #187676try the ProBuilder support forum
02/06/2022 at 7:31 PM #187689It’s ProScreener. I’ll move it.
Do not double post.
I’ll check it tomorrow.
02/07/2022 at 3:09 PM #187806Try using the attached ITF file.
It works fine.
02/08/2022 at 2:47 AM #187854Are you sure this is the code? Looks like its related to a trading system, not ranking stocks based on relative volume.
Also, please make it in english if you can, thank you!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviertDEFPARAM FLATAFTER = 235900// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten UhrzeitnoEntryBeforeTime = 065900timeEnterBefore = time >= noEntryBeforeTime// Verhindert das Trading an bestimmten WochentagendaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0R1 = 2*((DHigh(1) + DLow(1) + DClose(1) + DOpen(0))/4) - DLow(1) //R1PP = (DHigh(1) + DLow(1) + DClose(1) + DOpen(0))/4 //PP PunktS1 = 2*((DHigh(1) + DLow(1) + DClose(1) + DOpen(0))/4) - DHigh(1) //S1// Bedingungen zum Einstieg in Long-PositionenL1 = (close > S1) // Range untenL2 = (close < R1) // Range obenL3 = (close < PP) // Bedingung LongS3 = (close > PP) // Bedingung ShortELL = (close >= PP) // Tradeziel LongELS = (close <= PP) // Tradeziel Shortc0 = opentime=070000 // Tradestart open 0700IF NOT LongOnMarket and L1 and L2 AND L3 and c0 THENBUY 1 CONTRACT AT MARKETENDIF// Bedingungen zum Ausstieg von Long-PositionenIF LONGOnMarket AND ELL THENSELL AT MARKETENDIF// Bedingungen zum Einstieg in Short-PositionenIF NOT ShortOnMarket AND L1 and L2 AND S3 and c0 THENSell 1 CONTRACT AT MARKETENDIF// Bedingungen zum Ausstieg von Short-PositionenIF ShortOnMarket AND ELS THENEXITSHORT AT MARKETENDIF// Stops und TargetsSET STOP pLOSS sl //400SET TARGET pPROFIT tp //10002/14/2022 at 1:06 PM #18822302/14/2022 at 3:09 PM #188230Sorry, I attached a wrong file.
This is the screener (it’s yours):
123456myRVOL = CALL "RVOL"c1 = myRVOL > 1c2 = volume > 10000criteria = myRVOLscreen = c1 AND c2screener [screen](criteria AS "Relative VOL")and this is the RVOL indicator:
123// https://www.prorealcode.com/topic/relative-volume-rvol/rvol = volume/average[5](volume)return rvolI tested both of them on a Daily chart and they work like a charm.
02/15/2022 at 4:49 AM #188249The indicator is incorrect. That’s not relative volume. That’s just “above average volume”. The other indicator is relative volume which doesn’t work when used. Please let me know if that makes sense or not, happy to clear it up.…and this is the RVOL indicator:123rvol = volume/average[5](volume)return rvolI tested both of them on a Daily chart and they work like a charm.
02/15/2022 at 5:11 AM #188250It’s Nicolas’code I found at the link you posted.
If it’s not correct, post the code you are using.
02/15/2022 at 12:45 PM #188287Nicolas’ code has two versions. The correct one which shows relative volume is this one:
Relative Volume Indicator123456789101112131415161718192021222324Period = 5 //X days averaging periodintraindex = intradaybarindex$ivol[intraindex] = volume$gvol[barindex] = volume$gintraindex[barindex] = intraindexcount = 0sum = 0for i = barindex downto 0 doif $gintraindex[i]=intraindex then //found same intraday barsum=sum+$gvol[i]count=count+1endifif count=period thenbreakendifnextavg = sum/periodrvol = $ivol[intraindex] / avgreturn rvol style(histogram)//$ivol[intraindex], avg coloured(255,0,0)02/15/2022 at 5:06 PM #188305Still no error is reported.
I am attaching the two files I used.
02/16/2022 at 3:18 PM #188355This is so weird. I just ran the exact same screener code that I had already saved in my prorealtime to test it first and it now works!
Anyway, thanks a lot Robert for being so responsive and willing to help.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on