Announcement

Collapse
No announcement yet.

getValueAbsolute() bug

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getValueAbsolute() bug

    When eSignal starts up, getValueAbsolute() doesn't show correct value in the following scenario. The EFS is applied to ($SPX, 5).
    getValueAbsolute("day", 0, -1, vSymbol) should show the most current day (29, which is today ), but what shown is last Friday's date ( 26 ). After reload the EFS, the result returned becomes correct.


    In Format Output window, after
    the starting up, it looks like

    26 29

    After the reload, it is shown as

    29 29
    26 29







    var vSymbol = null;
    var vInterval = null;

    var done;

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Test");
    done = false;

    }


    function main() {

    var vInterval = getInterval();
    if(vInterval == null)
    return null;

    if(vInterval == "D")
    return null;

    if(vInterval == "W")
    return null;

    if(vInterval == "M")
    return null;

    if(vInterval == "T")
    return null;

    if(vInterval > 5)
    return null;

    var nState = getBarState();

    if ( nState == BARSTATE_ALLBARS ) {
    done = false;
    }

    vSymbol = getSymbol() + ",D";

    if ( getCurrentBarIndex() == 0 ) {
    if ( done == false ) {
    var d1, d0;
    d1 = getValueAbsolute("day", 0, -1, vSymbol); d1 = d1[0];
    d0 = getValue("day", 0, -1, getSymbol()+","+getInterval()); d0 = d0[0];

    debugPrintln(d1 + " " + d0);

    done = true;

    }
    }

    }

  • #2
    Hello Clearpicks,

    Thanks for bringing this to our attention. I'll pass your discovery along to our development team.

    The code example below will correct the problem for you. When asking for "day" with getValueAbsolute(), it isn't necessary to pass the symbol as you did with vSymbol, which is most likely causing this problem.

    PHP Code:
    var vSymbol null;
    var 
    vInterval null;

    var 
    done false;

    function 
    preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("Test");
    }


    function 
    main() {

        var 
    vInterval getInterval(); 
        if(
    vInterval == null)
        return 
    null;

        if(
    vInterval == "D") return null;
        if(
    vInterval == "W") return null;
        if(
    vInterval == "M") return null;
        if(
    vInterval == "T") return null;

        if(
    vInterval 5) return null;

        var 
    nState getBarState();

        if ( 
    nState == BARSTATE_ALLBARS ) { 
            
    done false;
        }

        
    //vSymbol = getSymbol() + ",D";

        
    if ( getCurrentBarIndex() == ) { 
            if ( 
    done == false ) {
                var 
    d1d0;
                
    d1 getValueAbsolute("day"01); 
                
    d1 d1[0];
                
    d0 getValue("day"0, -1getSymbol()+","+getInterval()); d0 d0[0];
                
    debugPrintln(d1 " " d0); 
                
    done true;
            }
        } 

    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Hi,


      I encountered this problem when I tried to use getValueAbsolute("high", -1, -1, "$SPX,D") to retrieve the previous day's high price. However it returned the high price of the day before yesterday. My testing script is only an example. The error not appears for every symbol. After the study is manually reloaded, the value returned becomes always correct. Also I remember I reported on daily chart, if the chart is left open before the trading session begins, esignal continues drawing the current day's data on the bar of previous day instead of creating a new bar. These two errors might be caused by the same bug in eSignal. Could you verify it for me? Thanks.


      Clearpicks





      Originally posted by JasonK
      Hello Clearpicks,

      Thanks for bringing this to our attention. I'll pass your discovery along to our development team.

      The code example below will correct the problem for you. When asking for "day" with getValueAbsolute(), it isn't necessary to pass the symbol as you did with vSymbol, which is most likely causing this problem.

      PHP Code:
      var vSymbol null;
      var 
      vInterval null;

      var 
      done false;

      function 
      preMain() {
          
      setPriceStudy(true);
          
      setStudyTitle("Test");
      }


      function 
      main() {

          var 
      vInterval getInterval(); 
          if(
      vInterval == null)
          return 
      null;

          if(
      vInterval == "D") return null;
          if(
      vInterval == "W") return null;
          if(
      vInterval == "M") return null;
          if(
      vInterval == "T") return null;

          if(
      vInterval 5) return null;

          var 
      nState getBarState();

          if ( 
      nState == BARSTATE_ALLBARS ) { 
              
      done false;
          }

          
      //vSymbol = getSymbol() + ",D";

          
      if ( getCurrentBarIndex() == ) { 
              if ( 
      done == false ) {
                  var 
      d1d0;
                  
      d1 getValueAbsolute("day"01); 
                  
      d1 d1[0];
                  
      d0 getValue("day"0, -1getSymbol()+","+getInterval()); d0 d0[0];
                  
      debugPrintln(d1 " " d0); 
                  
      done true;
              }
          } 

      Comment


      • #4
        Hello Clearpicks,

        Thank you for the details. I will look into this further.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Hello Clearpicks,

          Can you give me a code example or a description of how to recreate the getValueAbsolute() error you encountered? I was not unable to reproduce this using a similar code example to your first one in this thread.

          FYI, I haven't looked into the second error yet, but I plan to tomorrow morning.
          Jason K.
          Project Manager
          eSignal - an Interactive Data company

          EFS KnowledgeBase
          JavaScript for EFS Video Series
          EFS Beginner Tutorial Series
          EFS Glossary
          Custom EFS Development Policy

          New User Orientation

          Comment


          • #6
            Hello Clearpicks,

            I was able to reproduce the bug with getValueAbsolute() today and will report it to our development team.
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              Hello Clearpicks,

              I need a few more details in regards to the problem you reported with the daily interval. I haven't been able to reproduce this problem yet on build 608.

              Also I remember I reported on daily chart, if the chart is left open before the trading session begins, esignal continues drawing the current day's data on the bar of previous day instead of creating a new bar.
              Which build did you report this problem with? Are you able to reproduce this bug currently? If so, what symbol(s) and time template are you using? Do you launch eSignal prior to the market open or are you leaving it connected overnight?
              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment


              • #8
                Hi JasonK,

                I am using build 608. I will try to reproduce the problem tomorrow. Right now I just always start eSignal a few seconds after the market is open, therefore I don't know whether the problem is fixed or not. Because I am using the same version as the one when I reported the bug, I doubt it has been fixed untill the error was caused by the server side.


                Clearpicks



                Originally posted by JasonK
                Hello Clearpicks,

                I need a few more details in regards to the problem you reported with the daily interval. I haven't been able to reproduce this problem yet on build 608.



                Which build did you report this problem with? Are you able to reproduce this bug currently? If so, what symbol(s) and time template are you using? Do you launch eSignal prior to the market open or are you leaving it connected overnight?

                Comment


                • #9
                  Hi JasonK,


                  The problem is still there. See the attached screenshot. I captured it at arround 09:31AM. The price was drawn on yesterday's bar.


                  Clearpicks



                  Originally posted by clearpicks
                  Hi JasonK,

                  I am using build 608. I will try to reproduce the problem tomorrow. Right now I just always start eSignal a few seconds after the market is open, therefore I don't know whether the problem is fixed or not. Because I am using the same version as the one when I reported the bug, I doubt it has been fixed untill the error was caused by the server side.


                  Clearpicks
                  Attached Files

                  Comment


                  • #10
                    Hello Clearpicks,

                    I saw the problem this morning with $SPX on build 608. We're looking into this issue with our current beta. If it has not been addressed in the current beta, we'll report this problem again to the development team. I'll keep you posted.
                    Jason K.
                    Project Manager
                    eSignal - an Interactive Data company

                    EFS KnowledgeBase
                    JavaScript for EFS Video Series
                    EFS Beginner Tutorial Series
                    EFS Glossary
                    Custom EFS Development Policy

                    New User Orientation

                    Comment

                    Working...
                    X