Announcement

Collapse
No announcement yet.

Live Data Problem

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

  • Live Data Problem

    I think I have a fairly good grasp of the basics of efs programming. But every now and then I get some strange behavior and I always wonder "is it me, or is it them?".

    The following code is behaving differently today (Dec 24) than it did yesterday. (Actually, this is a simplified version of my code that I just put together for this post. It is behaving in the same odd manner.)

    ===
    Code:
    var cnt = 0;
    const fontAM = "Arial Monospaced";
    // ************************************************
    function preMain(){
    }
    // ************************************************
    function main(){
       var cbi = getCurrentBarIndex();
       cnt = cnt + 1;
       var x = 0;
       var y = 15;
       //
       var textID = "x";
       var text = " [tick cnt = " + cnt + "] [cbi =  " + cbi + "] ";
       drawTextRelative(x, y, text, Color.black, Color.white, Text.RELATIVETOTOP, fontAM, 10, textID); 
    }
    // ************************************************
    ===

    I expect this code to -

    Display the count value and the current bar index on screen.

    I expect the cbi to be zero as soon as the history data has finished loading and live data begins to flow.

    I expect the count value to increment with each tick. The symbol I am (was, markets just closed) using is ES #F. Ticks are (were) comming in at a rate of up to several dozen per minute.

    ===

    What I'm seeing is -

    An index that never gets higher than -1.

    The text drawn on screen is aligning with the bar at index -1, rather than with the bar at index zero as specified in the code. There IS a bar at index zero, and it moves when each new tick arrives.

    My counter only increments when a new bar is started.

    ===

    I have a screen shot (.bmp) of what it is doing. I can post it if it will help.

    Is it my code? Or is there something else going on?
    Last edited by pflash50; 12-24-2003, 10:29 AM.

  • #2
    Hello pflash,

    It's not you, or your code.

    We're dealing with two issues here. The first issue with your cbi always returning -1 I think has to do with your EFS Settings. Go to Tools --> EFS --> Settings and uncheck the Performance option for Make all formulas compute on close. I ran your code snippet and I am getting 0 for cbi. This would also prevent the formula from counting trades during the interval.

    The second issue is a known problem we're having with EFS formulas not executing on every trade (where compute on close option is off) for ES or NQ. Development is aware of this problem. This will also prevent your code from counting trades properly. If you run your code on a regular equity symbol, the count should agree with the trades from the Time and Sales window.
    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
      Ah-Ha,

      And I'll bet that at least one of my other machines has that flag turned off. That's why I'm seeing the program behavior "change".

      Do you have any stats on the other problem. It doesn't sound too serious, but still it is good to know about it.

      Comment


      • #4
        Hello pflash,

        Did you mean, "status?" If so, I don't have any further info on the EFS execution issue with ES and NQ. We'll be sure to post some information if and when we can get some more details on the matter.
        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
          JasonK

          Since you seem to be monitoring the threads, please look at this thread: http://forum.esignalcentral.com/show...&threadid=5702

          and post a response over there.

          Comment


          • #6
            xygeek

            Jason K -if I am allowed- is more focused on EFS developing and solving. And in this he is a real Top.

            I do not think he has the responsability for every thread in the BB, expecially on the merely operative ones like the such you point .

            Esig Staff dedicated will solve that inconvenience.

            Merry christmas.
            Fabrizio L. Jorio Fili

            Comment

            Working...
            X