Intraday flexible camarilla pivot points

Intraday flexible camarilla pivot points

A flexible intraday camarilla pivot points indicator was requested on the probuilder french forum, working for no matter how small the timeframe, robust enough to function in case of empty bars :

http://www.prorealcode.com/topic/point-pivot-camarilla-hourly/

Change integer n among values 15, 30, 60, 120, 180, 240 in minutes as the period for calculation of the camarilla pivot points.

Use start and finish variables in HHMMSS format for intraday start and finish times. First calculation is made one « n »  period after the start.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. FXTT • 10/12/2020 #

    the choice of period and start and end time is exactly what i was asking for the classic pivot calculation in another thread. Being able to define those parameters is awesome. Is there any chance this methodology could be applied for the classical pivot calculation? apologies if a bit straightforward, I am new here so don’t know if requests are taken. Many thanks in advance.

    • Noobywan • 10/12/2020 #

      Hi FXTT, no problem for requests (as long as no one requests me singing), just usually it’s preferred for the forum to be the entry point. For the classic pivot points using above flexible intraday coding method, we would just need to replace lines 46 to 68 with classic calculation, and keep everything else above ligne 46 the same, the end result is:

      // PRC classic points intraday, adapted from Camarilla Pivot Points intra day
      // 04.10.2020 mod 09.10.2020 mod 14.12.2020
      // Noobywan @ http://www.prorealcode.com
      // Sharing ProRealTime Knowledge
      // Forum ProBuilder user Choliver request

      // — Settings
      n=120 // time span in minutes, choose parameter n equal to 15, 30, 60, 120, 180 or 240
      start=080000 // time start in HHMMSS format
      finish=220000 // time end in HHMMSS format
      // — End of settings
      //
      if n=15 then
      changebarre= openminute[1]>openminute or (openminute[1]=15) or (openminute[1]=30) or (openminute[1]=45)
      deltamin=1500
      elsif n=30 then
      changebarre= openminute[1]>openminute or (openminute[1]=30)
      deltamin=3000
      elsif n=60 then
      changebarre= openminute[1]>openminute
      deltamin=10000
      elsif n=120 then
      deltamin=20000
      hrs=(opentime-start)/deltamin
      changebarre= (hrs[1]=1) or (hrs[1]=2) or (hrs[1]=3) or (hrs[1]=4) or (hrs[1]=5) or (hrs[1]=6) or (hrs[1]=7) or (hrs[1]=8) or (hrs[1]=9) or (hrs[1]=10) or (hrs[1]=11)
      elsif n=180 then
      deltamin=30000
      hrs=(opentime-start)/deltamin
      changebarre= (hrs[1]=1) or (hrs[1]=2) or (hrs[1]=3) or (hrs[1]=4) or (hrs[1]=5) or (hrs[1]=6) or (hrs[1]=7)
      elsif n=240 then
      deltamin=40000
      hrs=(opentime-start)/deltamin
      changebarre= (hrs[1]=1) or (hrs[1]=2) or (hrs[1]=3) or (hrs[1]=4) or (hrs[1]=5)
      else
      DRAWTEXT(“n must be 15, 30, 60, 120, 180 or 240”, barindex, close)
      endif
      //
      if changebarre or (opentime[1]=start) then
      stoque=barchange
      barchange=barindex
      myhigh=highest[barchange-stoque](high)[1]
      mylow=lowest[barchange-stoque](low)[1]
      myclose=close[1]
      endif
      //
      if opentime>=start+deltamin and opentime<finish then

      PPclassic = (myhigh+mylow+myclose)/3
      R1classic = 2*PPclassic-mylow
      R2classic = PPclassic+(myhigh-mylow)
      R3classic = myhigh+2*(PPclassic-mylow)
      S1classic = 2*PPclassic-myhigh
      S2classic = PPclassic-(myhigh-mylow)
      S3classic = mylow-2*(myhigh-PPclassic)

      else
      PPclassic = 0
      R1classic = 0
      R2classic = 0
      R3classic = 0
      S1classic = 0
      S2classic = 0
      S3classic = 0
      endif

      RETURN PPclassic AS "PP", R1classic AS "R1", R2classic AS "R2", R3classic AS "R3", S1classic AS "S1", S2classic AS "S2", S3classic AS "S3"

  2. Noobywan • 10/12/2020 #

    (My apologies for unformatted code, the formatting only works in forum or library posts not in library comments)

  3. JC_Bywan • 10/12/2020 #

    Bug fix at line 38, should be:

    if changebarre or (opentime[1]=start) then

    (same as in modified code in 10/12/2020 comment above)

    My apologies

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
rajiwas Hello Nicolas, With Daily Pivot, it easy for me to show current day pivot e.g. if Date = T...
Nicolas You'll find many other pivots points indicators in the library, just use the search box of t...
rajiwas Thanks for the suggestion.
Doctrading Thanks, man !
rajiwas How is it possible to add currentWeekHigh and currentWeekLow, currentWeekOpen and currentWee...
Takeshi Totally don't match the PRT basic pivots on weekly
Grantx When I add this code, the indicator appears in the panel below price. How do I get it to dis...
Patrik72 Hello, thank you very much for the great indicator. One question, is it possible just have l...
datageek is it possible to add Mid pivot points (midR1 and MidS1)?

Top