Announcement

Collapse
No announcement yet.

Data outside of high/low study range

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

  • Data outside of high/low study range

    Hello,

    how can a Low of the previous day be larger than the Close?
    The Script is from eSignal.

    Karsten
    Attached Files

  • #2
    Hi,

    Are you sure that's what the code is trying to do? Post the source or a link to it if you can, and I will take a look.

    G
    Garth

    Comment


    • #3
      Karst

      Can you enclose the efs you are using ?

      Can You tell to @lpha the time templates you have on , as the @lpha message?

      Thos will help to replicate the problem and find the possible answer. I will forward your message to Alexis or Some other suoer EFS expert.

      Cordially
      Fabrizio L. Jorio Fili

      Comment


      • #4
        Garth
        Thank you, you just beat me of a swosh.....but only you can take a look at the script....
        Fabrizio L. Jorio Fili

        Comment


        • #5
          Hello g,

          You have the code.

          Karsten

          /************************************************** **************************************************
          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() {
          }


          /*
          * This is a neat formula because it is working on multiple intervals
          * sBarItem will be "Open", "High", "Close", or "Low"
          *
          */

          var vLastRawTime = null;
          var vLastValue = null;
          var vSymbol;
          var vInterval;

          function main(sBarItem) {
          if(sBarItem == null) {
          return;
          }

          var vBar;
          var vRawTime;
          var vBarTime;
          var vAbsTime;
          var vIndex;


          var nState = getBarState();
          if(nState == BARSTATE_ALLBARS) {
          vLastRawTime = null;
          vLastValue = null;
          vSymbol = getSymbol();
          vInterval = getInterval();
          vSymbol += ",D";
          }

          /*
          * What is the current symbol and interval
          */
          if(vInterval == null)
          return;

          /*
          * No need to show the OHL or C on a daily chart.
          * only interested in seeing OHLorC on intraday.
          */
          if(vInterval == "D" || vInterval == "W" || vInterval == "M")
          return;

          vRawTime = getValue("rawtime");
          if(vRawTime == null)
          return;

          vRawTime = Math.floor(vRawTime / RawTime.DAY);

          // Start of Performance addition
          if(vLastRawTime != null) {
          if(vRawTime == vLastRawTime) {
          return vLastValue;
          }
          }


          /*
          * What time is the current bar?
          */
          vBarTime = getValue("time");

          if(vBarTime != null) {
          /*
          * vTime is currently the time for the current intraday bar.
          * Ask for the time of the previous trading day for "Symbol,D"
          * Note: See that we are asking for a different time frame
          * than the default by passing a symbol,interval
          */
          vAbsTime = getPreviousTradingDay(vBarTime, vSymbol);
          //#####################getPreviousTradingDay -> I think this is the problem.########################################## ########################

          if(vAbsTime == null)
          return;

          /*
          * Get index to first bar of day. In this case the daily bar.
          */
          vIndex = getFirstBarIndexOfDay(vAbsTime, vSymbol);
          if(vIndex != null) {
          vBar = getValueAbsolute(sBarItem, vIndex, vSymbol);
          vLastRawTime = vRawTime;
          vLastValue = vBar;
          return vBar;
          }
          }
          return;

          }
          Attached Files

          Comment


          • #6
            I use 0:00 - 24:00 Time Templates.

            */
            vAbsTime = getPreviousTradingDay(vBarTime, vSymbol);

            //#####################
            getPreviousTradingDay -> I think this is the problem. ##########################################

            if(vAbsTime == null)
            return;
            Last edited by karst; 08-06-2003, 08:29 AM.

            Comment


            • #7
              So I assume what you are doing is running PrevLow.efs and PrevClose.efs and that is what you took a snap shot of?

              I see you use a 0:00-24:00 TT - when I set up a 15 min chart using a 0-24 TT and have the PrevLow and PrevClose scripts loaded I don't see the same problem on any of the sharts I looked at.

              What symbol/interval are you using?

              G
              Garth

              Comment


              • #8
                Hello G,

                So I assume what you are doing is running PrevLow.efs and PrevClose.efs and that is what you took a snap shot of?

                Yes.

                I see you use a 0:00-24:00 TT - when I set up a 15 min chart using a 0-24 TT and have the PrevLow and PrevClose scripts loaded I don't see the same problem on any of the sharts I looked at.

                What symbol/interval are you using?

                G

                Please look at the picture.

                1min and 15min.
                The same problem.

                Karsten
                Attached Files
                Last edited by karst; 08-06-2003, 11:18 AM.

                Comment


                • #9
                  1min
                  Attached Files

                  Comment


                  • #10
                    15 min ES on 0:00 to 24:00.

                    Red is the prev close
                    Blue is the prev low

                    Looks correct. I can't reproduce.

                    Garth
                    Attached Files
                    Garth

                    Comment


                    • #11
                      1 min looks good also.

                      G
                      Attached Files
                      Garth

                      Comment


                      • #12
                        I don't understand. I newer changed the scripts.
                        I tested with other time intervals and the same problems.

                        Please can you send me a private message with this scripts.

                        thank you for support
                        Karsten
                        Last edited by karst; 08-06-2003, 12:23 PM.

                        Comment


                        • #13
                          Hi,

                          I doubt it is the scripts, not sure what it is. However, here are the two scripts off the computer where I did the tests.
                          Attached Files
                          Last edited by gspiker; 08-06-2003, 05:02 PM.
                          Garth

                          Comment

                          Working...
                          X