Announcement

Collapse
No announcement yet.

Day session OHLC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Day session OHLC

    Does anyone know how i can get the OHLC study to draw lines for the ES day session only? it seems to me this is basic info and should be readily available. Current OHLC study draws line taking into account globex session. thanks.

  • #2
    scolberg13
    Use the =2 extension in the symbol ie ES U5=2 (or ES #F=2 for the continuous contract). That will return the RTH session only. Note that the =2 extension is not available for all symbols
    Alex

    Comment


    • #3
      THX Alex!

      Comment


      • #4
        bc
        FWIW the PivotPointsAll2 efs posted here can already calculate the pivots of the RTH session of YM or any other symbol that does not have an =2 equivalent. See the message prior to the linked one for an explanation on how to do it
        Alex


        Originally posted by billco
        Alexis,

        How does one deal with the issue that there is no =2 symbol for YM?

        Thanks for the reply.

        bc

        Comment


        • #5
          Originally posted by Alexis C. Montenegro
          bc
          FWIW the PivotPointsAll2 efs posted here can already calculate the pivots of the RTH session of YM or any other symbol that does not have an =2 equivalent. See the message prior to the linked one for an explanation on how to do it
          Alex

          I missed that little jewel. I assume that the time template would have to be altered for tick charts?

          Taking nothing away from your fine work, the idea of being able to quickly insert, remove, and adjust calculated pivots/S-R points with the simple click of a button as I previously described does have merit perhaps. Case in point, some may want to adjust pivots used at the open from those used in the afternoon session. Chris's Pivot Console allows that option, but then we are back to that pesky =2 issue again. The three point manual tool addresses both of those issues. Just a thought.

          Thanks for the reply.

          bc

          Comment


          • #6
            bc
            You can use it as is also with tick based charts. In the images enclosed below you can see that the pivots are the same when plotted on a 1000T or a 15 min chart. This is because the pivots are calculated on a 405 minute interval set in the Time Template to start/end at 9:30/16:15 (created in this case to simulate a daily bar).
            Alex



            Originally posted by billco
            I missed that little jewel. I assume that the time template would have to be altered for tick charts?

            Taking nothing away from your fine work, the idea of being able to quickly insert, remove, and adjust calculated pivots/S-R points with the simple click of a button as I previously described does have merit perhaps. Case in point, some may want to adjust pivots used at the open from those used in the afternoon session. Chris's Pivot Console allows that option, but then we are back to that pesky =2 issue again. The three point manual tool addresses both of those issues. Just a thought.

            Thanks for the reply.

            bc

            Comment


            • #7
              Originally posted by Alexis C. Montenegro
              bc
              FWIW the PivotPointsAll2 efs posted here can already calculate the pivots of the RTH session of YM or any other symbol that does not have an =2 equivalent. See the message prior to the linked one for an explanation on how to do it
              Alex


              Alexis,

              I was unable to figure out how to get S-R/PP’s for YH+YL+YC/3 based on a 0930-1600 timeframe using your PivotPointsAll2.efs that you generously provided.

              I was however, able to get the following code you provided to accurately reflect the manual calculation of YH+YL+YC/3 based on yesterdays 0930-1600 timeframe by changing the "405" intervals to "390" (representing 1600 close in lieu of your 1615 setting) in addition to changing the close "D" to "390" as well.

              For reference, I used the same custom time template as per your instruction for both efs codes.

              function preMain() {

              setPriceStudy(true);
              setStudyTitle("Pivot Points");
              setCursorLabelName("PP-R2", 0);
              setCursorLabelName("PP-R1", 1);
              setCursorLabelName("PP", 2);
              setCursorLabelName("PP-S1", 3);
              setCursorLabelName("PP-S2", 4);
              }

              var vPP = null;
              var vR1 = null;
              var vS1 = null;
              var vR2 = null;
              var vS2 = null;

              function main() {

              var vHigh = high(-1,inv("390"));
              var vLow = low(-1,inv("390"));
              var vClose = close(-1,inv("390"));

              if (vHigh==null||vLow==null||vClose==null) return;

              vPP = (vHigh+vLow+vClose)/3;
              vR1 = 2*vPP-vLow;
              vS1 = 2*vPP-vHigh;
              vR2 = (vPP-vS1)+vR1;
              vS2 = vPP-(vR1-vS1);

              return new Array(vR2, vR1, vPP, vS1, vS2);
              }
              ------------------------------------------

              My next question is whether or not todays opening can be added to give YL+YH+YC+TO/4 still using the 0930-1600 (390) time interval? And if so, a method to switch between the two. Clear as mud?

              Any input you may provide is much appreciated.

              Thanks!

              bc

              Comment


              • #8
                bc

                I was unable to figure out how to get S-R/PP’s for YH+YL+YC/3 based on a 0930-1600 timeframe using your PivotPointsAll2.efs

                All you need to do is insert 390 as the Interval in Edit Studies and then create a 390 minute User Defined Interval in the Time Template that Starts/Ends at 9:30/16:00.

                My next question is whether or not todays opening can be added to give YL+YH+YC+TO/4 still using the 0930-1600 (390) time interval?

                There already is a provision to use today's Open in the PivotPointsAll2.efs. That option gets enabled if you select "Woodie" as the Type in Edit Studies. The Open will be that of the defined interval so if that is set to 390 minutes it will use the Open at the Start time of the Time Template.
                If you want to have the PP calculated on (yH+yL+yC+tO)/4 you will need to replace line 118 ie
                vPP = (vHigh+vLow+(2*vOpen))/4;
                with
                vPP = (vHigh+vLow+vClose+vOpen)/4;
                Then use the selector in Edit Studies to switch between the Types of Pivots
                Alex

                Originally posted by billco
                Alexis,

                I was unable to figure out how to get S-R/PP’s for YH+YL+YC/3 based on a 0930-1600 timeframe using your PivotPointsAll2.efs that you generously provided.

                I was however, able to get the following code you provided to accurately reflect the manual calculation of YH+YL+YC/3 based on yesterdays 0930-1600 timeframe by changing the "405" intervals to "390" (representing 1600 close in lieu of your 1615 setting) in addition to changing the close "D" to "390" as well.

                For reference, I used the same custom time template as per your instruction for both efs codes.

                function preMain() {

                setPriceStudy(true);
                setStudyTitle("Pivot Points");
                setCursorLabelName("PP-R2", 0);
                setCursorLabelName("PP-R1", 1);
                setCursorLabelName("PP", 2);
                setCursorLabelName("PP-S1", 3);
                setCursorLabelName("PP-S2", 4);
                }

                var vPP = null;
                var vR1 = null;
                var vS1 = null;
                var vR2 = null;
                var vS2 = null;

                function main() {

                var vHigh = high(-1,inv("390"));
                var vLow = low(-1,inv("390"));
                var vClose = close(-1,inv("390"));

                if (vHigh==null||vLow==null||vClose==null) return;

                vPP = (vHigh+vLow+vClose)/3;
                vR1 = 2*vPP-vLow;
                vS1 = 2*vPP-vHigh;
                vR2 = (vPP-vS1)+vR1;
                vS2 = vPP-(vR1-vS1);

                return new Array(vR2, vR1, vPP, vS1, vS2);
                }
                ------------------------------------------

                My next question is whether or not todays opening can be added to give YL+YH+YC+TO/4 still using the 0930-1600 (390) time interval? And if so, a method to switch between the two. Clear as mud?

                Any input you may provide is much appreciated.

                Thanks!

                bc

                Comment


                • #9
                  bc
                  The error in the "Woodie" calculations was due to a missing +1 in line 117 which should be

                  PHP Code:
                  vOpen  xOpen.getValue(-Lookback+1); 
                  This caused it to retrieve the prior day's Open rather than the current day's Open.
                  I have now replaced the efs in the original post and in my FileShare group.
                  Alex

                  Originally posted by billco
                  OK, by placing 390 in the edit studies interval, the classic H+L+C/3 numbers are correct. However, when switched to "Woodies" H+L+0+0/4, they don't appear to be correct.

                  Using yesterdays YM numbers:

                  High = 10491
                  Low = 10360
                  Close = 10486
                  Today Open = 10484

                  PP should be 10455.00
                  S1 should be 10419.00
                  S2 should be 10324.00
                  R1 should be 10550.00
                  R2 should be 10586.00



                  The AllPivotPoints2.efs displays the Woodies pivots as follows:

                  PP = 10420
                  S1 = 10349
                  S2 = 10289
                  R1 = 10480
                  R2 = 10551



                  The time template is exactly per your instructions except for the changing of 405 to 390 as discussed. Same timeplate was used for classic and woodies settings.

                  The AllPivotsPoints2.efs is "factory" default with no editing.

                  Once again, thanks for all that you do here on the forum.

                  bc

                  Comment


                  • #10
                    Originally posted by Alexis C. Montenegro
                    bc
                    The error in the "Woodie" calculations was due to a missing +1 in line 117 which should be

                    PHP Code:
                    vOpen  xOpen.getValue(-Lookback+1); 
                    This caused it to retrieve the prior day's Open rather than the current day's Open.
                    I have now replaced the efs in the original post and in my FileShare group.
                    Alex


                    You are truly an angel! Thanks ever so much.

                    I've been trying to get day session pivots on the YM for several months to no avail. And I won't even disclose how many hours I spent trying to get the efs to work only to find out it was simple as adding three numbers "390"! Aren't I feeling silly about now

                    Now that all is well, before I attempt to do so, I assume that replacing the woodie formula with the YH+YL+YC+TO/4 as previously discussed will still work as is?

                    BTW, do you ever sleep?!!!

                    Many regards,

                    bc
                    Last edited by billco; 09-01-2005, 06:23 PM.

                    Comment


                    • #11
                      bc
                      You are most welcome
                      Yes, modifying the Woodie PP formula as I indicated previously will still work
                      Alex

                      Originally posted by billco
                      You are truly an angel! Thanks ever so much.

                      I've been trying to get day session pivots on the YM for several months to no avail. And I won't even disclose how many hours I spent trying to get the efs to work only to find out it was simple as adding three numbers "390"! Aren't I feeling silly about now

                      Now that all is well, before I attempt to do so, I assume that replacing the woodie formula with the YH+YL+YC+TO/4 as previously discussed will still work as is?

                      BTW, do you ever sleep?!!!

                      Many regards,

                      bc

                      Comment


                      • #12
                        Originally posted by Alexis C. Montenegro
                        bc
                        You are most welcome
                        Yes, modifying the Woodie PP formula as I indicated previously will still work
                        Alex

                        Me again!

                        The classic H+L+C/3 calculates correctly. The Woody H+L+O+O/4 still is not correct per my calculations.

                        For reference, I've made no changes to the efs and it is "factory default" using the same time template with a 390 interval 0930-1600 for both calculations.

                        Using price as follows for 0930-1600 YM:

                        YH = 10528
                        YL = 10427
                        TO =10488


                        YH+YL+TO+TO/4 should be:

                        PP = 10483
                        R1 = 10539
                        R2 = 10584
                        S1 = 10438
                        S2 = 10382


                        PivotPointAll2.efs calculates YH+YL+TO+TO as follows:

                        PP = 10468
                        S1 = 10408
                        S2 = 10367
                        R1 = 10509
                        R2 = 10569


                        I checked and re-checked my numbers, and unless I am overlooking something simple, the above is what I keep coming up with.

                        Thanks.

                        bc

                        Comment


                        • #13
                          bc
                          As far as I can see it is calculating the pivots correctly
                          Alex



                          Originally posted by billco
                          Me again!

                          The classic H+L+C/3 calculates correctly. The Woody H+L+O+O/4 still is not correct per my calculations.

                          For reference, I've made no changes to the efs and it is "factory default" using the same time template with a 390 interval 0930-1600 for both calculations.

                          Using price as follows for 0930-1600 YM:

                          YH = 10528
                          YL = 10427
                          TO =10488


                          YH+YL+TO+TO/4 should be:

                          PP = 10483
                          R1 = 10539
                          R2 = 10584
                          S1 = 10438
                          S2 = 10382


                          PivotPointAll2.efs calculates YH+YL+TO+TO as follows:

                          PP = 10468
                          S1 = 10408
                          S2 = 10367
                          R1 = 10509
                          R2 = 10569


                          I checked and re-checked my numbers, and unless I am overlooking something simple, the above is what I keep coming up with.

                          Thanks.

                          bc

                          Comment


                          • #14
                            bc
                            I believe you have inserted 390 in the wrong parameter ie Optional Close Interval instead of Interval. That will return the same incorrect values you are seeing (see image)
                            Alex


                            Comment


                            • #15
                              billco,

                              I would suggest that you post the code you are having problems with as recommended in the forum posting guidelines. Normally, as you noted, it does not have to be this difficult, however, without posting code, the person on the other end of the forum is left having to use their crystal ball. I am sure if you do this, the problem you are having on your end will quickly be solved.

                              Comment

                              Working...
                              X