Announcement

Collapse
No announcement yet.

is this a bug of EFS or problem of data server?

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

  • is this a bug of EFS or problem of data server?

    If applying the following code to (SPY,1) and ($SPX,1), the "day" value printed out are different for the two symbols. For SPY, the values are correct, which are "1", while for "$SPX", the day returned by getValueAbsolute("day", 0, -1, "$SPX,D") is yesterday's day (30). is this a bug of EFS or problem of data server? Same error happens to indices like $COMPQ, $NDX, etc. but not $SOX. This is weird.

    One more thing, getValueAbsolute("high", 0, -11, "$SPX,D" ) returns the correct values. Therefore it seems getValueAbsolute("day", ......) is not correctly implemented. The "day" array is shifted by 1 and the more current day is missing.

    -- Clearpicks


    var vSymbol = null;
    var vInterval = null;

    function preMain() {
    }


    function main( ) {

    var vInterval = getInterval();

    if(vInterval != "1" && vInterval != "5" ) return null;

    var nState = getBarState();

    if ( nState == BARSTATE_ALLBARS ) {
    vSymbol = getSymbol() + ",D";
    }

    if ( getCurrentBarIndex() == 0 ) {
    var d1, d0;
    d1 = getValueAbsolute("day", 0, -1, vSymbol); d1 = d1[0];
    d0 = getValueAbsolute("day", 0, -1); d0 = d0[0];

    debugPrintln("daily: " + d1);
    debugPrintln("intraday: " + d0);
    }
    }
    Last edited by clearpicks; 10-01-2004, 09:17 AM.

  • #2
    Hello Clearpicks,

    I just tried your code on all the mentioned symbols (1min interval) and I'm not seeing a problem. There were a couple servers that were taken offline earlier this morning. It's possible you may have been connected to one of those. Have you restarted eSignal? By the way I added a flag to allow the debugPrint statements to only print once. Let me know if you're still seeing different results than below.



    PHP Code:
    var vSymbol null;
    var 
    vInterval null;

    function 
    preMain() {
    }

    var 
    bFlag false;

    function 
    main( ) {
        
        var 
    vInterval getInterval(); 
        
        if(
    vInterval != "1" && vInterval != "5" ) return null;
        
        var 
    nState getBarState();
        
        if ( 
    nState == BARSTATE_ALLBARS ) { 
            
    vSymbol getSymbol() + ",D";
        }
        
        if ( 
    getCurrentBarIndex() == && bFlag == false) { 
            var 
    d1d0;
            
    d1 getValueAbsolute("day"0, -1vSymbol); d1 d1[0];
            
    d0 getValueAbsolute("day"0, -1); d0 d0[0];
            
            
    debugPrintln(vSymbol" daily: " d1); 
            
    debugPrintln(getSymbol() + " intraday: " d0); 
            
    bFlag 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

    Working...
    X