Announcement

Collapse
No announcement yet.

Pivot Point EFS

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

  • Pivot Point EFS

    I wanted to change the pivot point efs by using today open as part of the formula. How could I do it, any help appreciated.

    Right now PP= Yesterday (H+L+C)/3

    I would like to change it to PP = Y(H+L+C) + Todays Open /4

    Thanks for any help

  • #2
    Re: Reply to post 'Pivot Point EFS'

    Akiri
    Don't know if this applies to what you are looking for, but mbriand (aka Matt Briand) has been doing some work on modified Pivots that include gaps and other interesting features.
    You can find his formulae at eSignal FileShare. Once there just do a Search using "efs" (without quotes) as the keyword.
    Alternatively you can look at the document at the following site
    http://home.attbi.com/~dloomis/esignal_index.doc
    that was compiled by Dave Loomis and that includes all efs related material available at FileShare.
    NB. The above document is quite extensive (14+ pages) so be patient.
    Alex
    Last edited by ACM; 12-19-2002, 04:49 PM.

    Comment


    • #3
      Alexis
      I found 2 files in the link and downloaded them, but there is nothing in them, size 0 KB, though the link says should be 6 KB each.

      The files are called PivotPointsGap.efs and PivotPointHalfGap.efs authored by Matt

      Maybe they need to be reloaded on the site.

      Comment


      • #4
        Re: Reply to post 'Pivot Point EFS'

        Akiri
        I just downloaded one called PivotPointsGap.efs from US Futures Daytrading
        group and the study is working.
        You may want to try the following procedure to download them:
        1. While in the eSignal application click on the icon "Get File from
        FileShare" in the eSignal FileShare Toolbar (the icon looks like a networked
        folder)
        2. This will open a browser window showing the FileShare site.
        3. Navigate to the appropriate group.
        4. Select the file to download
        5. This will open a window asking for your eSignalCentral username and
        password
        6. Once those are filled you should see the Formula Editor open with
        mbriand's formula
        7. Save it to local folder.
        Alex

        Comment


        • #5
          Thanks Alex, I found the files. He has done some wonderful stuff with pivot point formulas. Looks great. Was easier to modify them.

          Kiri

          Comment


          • #6
            Problems with PivotPoint.efs

            Problems with the Pivot Point.efs. I get different values for the same code in different time frames.

            E.g. Todays pivot on Dax was 2925 on 4 min, 2910 on 16 min and 2912 on 64min chart.

            The code is in the attached PivotPoint.txt file, and I don't understand why the pivot is different based on the time frame

            Any help appreciated.

            Akiri
            Attached Files

            Comment


            • #7
              Akiri
              You may want to post the code again.
              One suggestion is to include the code in the body of the message preceeding it with the word code and ending it with /code (both enclosed in square brackets - example [code]).
              An alternative is to zip the efs itself and attach the zip file.

              The above aside are you using any Time Templates with Dax? If yes are the Time Templates requesting a specific number of bars?

              Alex
              Last edited by ACM; 12-30-2002, 10:50 AM.

              Comment


              • #8
                If one saved the .txt file as .efs file that I attached it will be the code. IF there is another way of copying the code other than line by line I will be happy to do it.

                Comment


                • #9
                  Akiri
                  When in the Editor just click the beginning of the first line then Shift+Ctrl+End then Ctrl+C (or click the Copy icon) and then paste the whole thing into the message as in the example below.
                  Alex

                  Code:
                  /****************************************************************************************************
                  Copyright © eSignal, a division of Interactive Data Corporation. 2002. All rights reserved. 
                  This sample eSignal Formula Script (EFS) may be modified and saved under a new 
                  filename; however, eSignal is no longer responsible for the functionality once modified.
                  eSignal reserves the right to modify and overwrite this EFS file with each new release.
                  ******************************************************************************************************/
                  
                  
                  
                  function preMain() {
                        setPriceStudy(true);
                        setStudyTitle("Pivot Points");
                        setCursorLabelName("R3", 0);
                        setCursorLabelName("R2", 1);
                        setCursorLabelName("R1", 2);
                        setCursorLabelName("PIVOT", 3);
                        setCursorLabelName("S1", 4);
                        setCursorLabelName("S2", 5);
                        setCursorLabelName("S3", 6);
                        setCursorLabelName("TR(D-1)", 7);
                  
                        // R3
                        setDefaultBarStyle(PS_SOLID, 0);
                        setDefaultBarFgColor(Color.fushcia, 0);
                        setDefaultBarThickness(4, 0);
                  
                        // R2
                        setDefaultBarStyle(PS_DASHDOT, 1);     
                        setDefaultBarFgColor(Color.fushcia, 1);
                        setDefaultBarThickness(3, 1);
                  
                        // R1
                        setDefaultBarStyle(PS_DOT, 2);
                        setDefaultBarFgColor(Color.fushcia, 2);
                        setDefaultBarThickness(3, 2);
                  
                        // PIVOT
                        setDefaultBarStyle(PS_SOLID, 3);
                        setDefaultBarFgColor(Color.fushcia, 3);
                        setDefaultBarThickness(5, 3);
                  
                        // S1
                        setDefaultBarStyle(PS_DOT, 4);
                        setDefaultBarFgColor(Color.fushcia, 4);
                        setDefaultBarThickness(3, 4);
                  
                        // S2
                        setDefaultBarStyle(PS_DASHDOT, 5);
                        setDefaultBarFgColor(Color.fushcia, 5);
                        setDefaultBarThickness(3, 5);
                  
                        // S3
                        setDefaultBarStyle(PS_SOLID, 6);
                        setDefaultBarFgColor(Color.fushcia, 6);
                        setDefaultBarThickness(4, 6);
                     
                  //    setComputeOnClose(); // to speed up things further, can be removed
                  
                  
                  }
                  
                  // Start of Performance addition
                  var vLastRawTime = null;
                  var vLastPPR3 = null;
                  var vLastPPR2 = null;
                  var vLastPPR1 = null;
                  var vLastPP = null;
                  var vLastPPS1 = null;
                  var vLastPPS2 = null;
                  var vLastPPS3 = null;
                  var vLastTR   = null;
                  var vLastArray = null;
                  var vSymbol = null;
                  var vInterval = null;
                  
                  
                  function main() {
                      var vH;
                      var vL;
                      var vC;
                        var vRawTime;
                        var vBarTime;
                        var vAbsTime;
                        var vIndex;
                  
                        var nState = getBarState();
                        if(nState == BARSTATE_ALLBARS) {
                              vLastRawTime = null;
                              vLastArray = null;
                              vLastPPR3 = null;
                              vLastPPR2 = null;
                              vLastPPR1 = null;
                              vLastPP = null;
                              vLastPPS1 = null;
                              vLastPPS2 = null;
                              vLastPPS3 = null;
                              vLastTR = null;
                              vInterval = getInterval();
                              vSymbol = getSymbol();
                              vSymbol += ",D";
                        }
                  
                        vRawTime = getValue("rawtime");
                        if(vRawTime == null)
                              return;
                  
                        vRawTime = Math.floor(vRawTime / RawTime.DAY);
                  
                  
                        // Start of Performance addition
                        if(vRawTime != null && vLastRawTime != null) {
                              if(vRawTime == vLastRawTime) {
                                    return vLastArray;
                                    // return new Array(vLastPPR3, vLastPPR2, vLastPPR1, vLastPP, vLastPPS1, vLastPPS2, VLastPPS3, vLastTR);
                              }
                        }
                  
                        if(vInterval == null)
                            return null;
                  
                        if(vInterval == "D")
                            return null;
                  
                        vBarTime = getValue("time");
                        if(vBarTime != null) {
                              vAbsTime = getPreviousTradingDay(vBarTime, vSymbol);
                              if(vAbsTime == null)
                                    return;
                  
                            vIndex = getFirstBarIndexOfDay(vAbsTime, vSymbol);
                            if(vIndex != null) {
                                    vH = getValueAbsolute("High", vIndex, vSymbol);
                                    vL = getValueAbsolute("Low",  vIndex, vSymbol);
                                    vC = getValueAbsolute("Close", vIndex, vSymbol);
                  
                                    if(vH != null && vL != null && vC != null) {
                                          vLastPP = (vH + vL + vC) / 3;
                                          vLastPPR1 = 2 * vLastPP - vL;
                                          vLastPPS1 = 2 * vLastPP - vH;
                                          vLastPPR2 = (vLastPP - vLastPPS1) + vLastPPR1;
                                          vLastPPS2 = vLastPP - (vLastPPR1 - vLastPPS1);
                                          vLastPPR3 = vLastPPR2 + (vH-vL);
                                          vLastPPS3 = vLastPPS2 - (vH-vL);
                                          vLastTR = (vH-vL);
                                          vLastRawTime = vRawTime;
                                          vLastArray = new Array(vLastPPR3, vLastPPR2, vLastPPR1, vLastPP, vLastPPS1, vLastPPS2, vLastPPS3, vLastTR);
                                          return vLastArray;
                                    }
                            }
                        }
                  
                        return null;
                  
                  }

                  Comment


                  • #10
                    Akiri
                    Just ran pivotpoints.efs on Dax and it looks good here on the same time frames (Time Template used is for 300 bars on 24hours)
                    Alex
                    Attached Files

                    Comment


                    • #11
                      Its been working fine now for a few days. I should have taken a snapshot of the chart then.

                      Comment


                      • #12
                        Pivots for Daily Weekly and Monthly Charts

                        I wanted to calculate the pivots for daily weekly and monthly charts.

                        1. The easiest would be to just get last bar value of HLC and switch the time to daily weekly and monthly.

                        2. Another would be to code the daily, monthly, weekly times into the code, so I could use the daily weekly monthly efs files in a single chart.

                        Is there a way to get the previous bar of daily interval or monthly interval (not the bar that is forming now)?

                        And is there a variable like Lastseenbar, or getpreviousbar or getprevioustradingweek?

                        The change that needs to be made would in this section of code, any help appreciated.

                        Code:
                        // initialize upon first loading formula
                        if(getBarState() == BARSTATE_ALLBARS) { 
                        
                        vInterval = getInterval();
                        vSymbol = getSymbol().toUpperCase();
                        
                        
                        // return null if not an intraday chart
                        if(vInterval == null || vInterval == "T")
                        return null;
                        
                        // if first bar in new day, get and save yesterday's data
                        var vThisday = null;
                        if (vLastSeenDay != (vThisDay = getDay()) ) {
                        
                        var vTime = getValue("Time");
                        if(vTime != null) {
                        var vYDay = getPreviousTradingDay(vTime,vSymbol);
                        if(vYDay != null) {
                        var vIndex = getFirstBarIndexOfDay(vYDay,vSymbol);
                        if(vIndex != null) {
                        var ydayH = getValueAbsolute("High", vIndex, vSymbol);
                        var ydayL = getValueAbsolute("Low", vIndex, vSymbol);
                        var ydayC = getValueAbsolute("Close", vIndex, vSymbol);
                        var P = (ydayH + ydayL + ydayC) / 3;

                        Comment


                        • #13
                          Using DrawTextRelative in Pivot Studies

                          I would like to have a text next to the pivot line P that would have the label and the value

                          I tried adding this following line to the code in the previous message but nothing happened. I don't get an error and I don't see any text.

                          Any help appreciated in putting in the code correctly.

                          Kiri

                          PHP Code:
                          //Display the price value
                                      
                          drawTextRelative (5,10,  "P"nullnullText.Right ,null,null,"P"+P); 

                          Comment


                          • #14
                            Well, I'm not sure. A few things pop to mind:

                            1) The label HAS to be unique. If it isn't only one will ever show up, and all the others will the same label will never display.

                            2) I always set the FG and BG color. I have never tried to use null, and am unsure what that will do.

                            3) If the X and Y values are "off the chart" they will be painted, but you will never see them. For example, painting it at a price of 5 when the chart price is 100...you will never see the P.

                            Hope this helps...

                            G
                            Garth

                            Comment


                            • #15
                              So how does one make the price relative, that is the X and Y values. All I want is to place the Label and price in front of the line being drawn.

                              Esignal does not allow for labels on the y axis so I was using this to do that.

                              Kiri

                              Comment

                              Working...
                              X