Camarilla Pivots Proximity
Forums › ProRealTime English forum › ProScreener support › Camarilla Pivots Proximity
- This topic has 5 replies, 2 voices, and was last updated 2 years ago by brunoasoliveira.
-
-
06/10/2022 at 4:51 PM #195095
Hi Everyone,
I’m trying to set a proscreener code to find stocks with proximity to Camarilla pivots R4 and S4. The problem is in defining the value of the pivots. The value that PRT is presenting in the screener is not the same as the chart. In some stocks, the difference is much bigger. I already used the parameters as an indicator and the lines are in the same value of the PRT Camarilla Pivots. I don’t know what to do more… 🙁 I have in the screener (file attached) a column with the S4 value.
The code i’m using is this:
123456789101112131415161718192021222324myH = ( DHIGH(1) )myL = ( DLOW(1) )myC = ( DCLOSE(1) )//Camarilla Support S4CAMS4 = myC-(myH-myL)*(1.1/2)//Camarilla Support S3CAMS3 = myC-(myH-myL)*(1.1/4)//Camarilla Support R4CAMR4 = ((myH-myL)*1.1)/2+myC//Camarilla Support R3CAMR3 = ((myH-myL)*1.1)/4+myCc1 = close <= ((CAMS4+CAMS3)/2) AND close >= CAMS4C2 = close >= ((CAMR4+CAMR3)/2) AND close <= CAMR4indicator1 = Volumec3 = (indicator1 >= 2000000)c4 = Volume > 1000000C5 = Close > 10 AND CLOSE < 200C6 = AverageTrueRange[14](Close) > 3criteria = CAMS4SCREENER[c1 AND C3 AND C4 AND C5 AND C6 OR c2 AND C3 AND C4 AND C5 AND C6] (criteria AS "Cam_Sup4")06/10/2022 at 5:17 PM #195098What I found right now, was that the HOD and LOD of the previous day in the code, considers the pre-market time and Camarilla Pivots don’t. How can i correct this?
Thanks in advance.
Regards
07/07/2022 at 11:29 AM #196962Hi everyone,
Any thoughts about how can I define the “high of the day” considering only regular time? I know that it is possible disabling the extended trading hours, but I need to see the resistances and supports in the premarket. Another possibility is to “call” camarilla pivots in the code, but i’m not seeing how. Any help will be greatfull.
Thanks in advance.
07/07/2022 at 11:44 AM #196965Hi,
Assuming a start time lower than finish time (meaning not either side of local midnight for a market in a faraway timezone, which would require to amend timing conditions), and assuming a not too small intraday timeframe to avoid empty candles and to avoid more complex coding solution, this should give you the high, low and close for customised start and finish times in lines 1,2 in HHMMSS format:
12345678910111213141516start=080000finish=220000if opentime=start thenmyH=highmyL=lowendifif opentime>=start and opentime<finish thenmyH=max(high, myH)myL=min(low,myL)endifif time=finish thenmyC=closeendifreturn myL, myH, myC07/07/2022 at 12:31 PM #196971Sorry, above gave myL,myH,myC for the day in response to #196962, but if you want to include it in your screener in #195095 you would need previous day’s values not today’s, I should have written it differently to keep your myL, myH, myC names for same calc as you and avoid any potential confusion, so here it is rewritten with dayH,dayL,dayC feeding at end of day into myH,myL,myC remaining not overwritten the following morning to be available for pivot calc, and without return line to add it at beginning of your screener:
1234567891011121314151617start=080000//customise it in HHMMSSfinish=220000//customise it in HHMMSSif opentime=start thendayH=highdayL=lowendifif opentime>=start and opentime<finish thendayH=max(high, dayH)dayL=min(low,dayL)endifif time=finish thendayC=closemyL=dayLmyH=dayHmyC=dayCendif07/12/2022 at 1:27 PM #197173<span class=”bbp-author-name”>JC_Bywan</span>, you are the Master!!! Thank you very much for your help. Problem solved!
-
AuthorPosts