Announcement

Collapse
No announcement yet.

ALLBARS indication, in real time, after "reloadefs"

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

  • ALLBARS indication, in real time, after "reloadefs"

    Hi,

    I initate my studies at "ALLBARS" time, regardless if it is first time load or following a "reloadefs" command.
    I only iniate the studies I studies I need for a particular display configuration [to minimize execution time and overhead].

    The problem I have is that, sometimes, in real time and busy markets, the new studies to be displayed are not initialized, after reloadefs command.
    The problem NEVER hapens after hours, or at first load [new symbol or time interval] and very seldom in "calm" markets [low volume].

    My concl.usion is that EFS Engine, misses to send the ALLBARS indication in certain situations [like the ones I explained above].

    I tried to set a flag [global var] before "reloadefs", but it is not registered/recorded, therefor not found by my routine to initialize studies.

    Can someone explain what hapens and how it can be avoided?
    Note:
    The documentations gives no specifics for this situation other than "use reloadefs with caution and expect the unexpected".

    Thank you.
    Mihai Buta

  • #2
    I have posted this question almost two weeks ago and nobody from the eSignal support team bothered to answer.
    I will rephrase it in a way I know it will be answered.

    Note: It is not first time it hapened to me and I noticed I am not the only one to receive such "treatment".
    In fact, I see that if other users [Steve, Brad/Doji, Alex] are not kind enough to respond, questions may remain unaswered.
    Hell of a support for the tons of money we poay every month.
    Last edited by mbuta; 10-17-2009, 07:37 AM.
    Mihai Buta

    Comment


    • #3
      Mihai,

      have you tried to output the return value from getBarState() and the value associated with the BARSTATE_ALLBARS constant. I suggest you make this the first line of code in the efs. This will tell you if there is an issue with reloadEFS() or a hidden logic issue.

      To minimize resource overhead, you may want to start out outputing this only a couple times after a reloadEFS() command.
      Last edited by ; 10-17-2009, 08:24 PM.

      Comment


      • #4
        Hi Steve,

        Yes, it is exactly the way you suggested, first line of code.
        You know I do not ask until I make sure I tried everything possible.
        It obvious what's happening: ALLBARS is generated only on the first tick of the first bar. In busy times, first call to main [after reloadefs may not be on first tick and ALLBARS is never signaled.

        I faked it somehow and seems to work, but bothers me most is that it is so simple to fix, is someone from eSignal cares to escalate it. So far, nobody even responded.

        Thanks for the effort Steve.
        Mihai Buta

        Comment


        • #5
          Hi Mihai,

          Your welcome Mihai.

          Interesting behavior you are seeing, I am sure it is being looked into btw.

          I am pretty sure you already know this, but if not, here is what I know about the getBarState() method/function. First, when it is called, it returns a number, either a zero, one or a two (0, 1, or 2). BARSTATE_NEWBAR, BARSTATE_CURRENTBAR, and BARSTATE_ALLBARS are properties/constants assigned these values (gavishti pointed this out to me a while back). For a while I just compared getBarState() against the numbers but that got confusing, so I like using the named properties.

          When Chris Kryza and Alex started using a global variable (usually bInit) to test for efs initiation, I ran some tests and found it significantly more efficient. It makes sense if you think about it as you are looking up a variable versus calling a function (getBarState() ) that returns a value. I use this technique exclusively because of the inherent efficiency.

          The only downside is that global are not reset during a reloadEFS() invocation. This can be readily be compensated for by setting bInit to false just prior to executing reloadEFS().

          I would be interested in hearing in a reply to this thread the value returned from getBarstate() when you see this problem reoccur.

          You should also consider using the bInit technique. If you are already using it for efs2 object initiation, and do not want to reinitialize your efs2 objects, just create another global initiation variable. I believe it will make your code more efficient and put you in control.

          I've heard the reloadEFS() command was released grudgingly because of the potential for unforeseen problems like you are describing. I hope they keep it around in light of the problems you are seeing. While I do not use it often, it can be quite useful.


          Hope you find this helpful.
          Last edited by ; 10-18-2009, 07:32 AM.

          Comment


          • #6
            Hi Steve,

            First, I sure hope they keep aroung reloadEFS. I am using it a lot, primarily to change the display configuration with a bunch of buttons [you can see some pictures in my "Multi-Time Interval" fileshare].

            Second, I ended up doing exactly what you suggested: use nInit for first load [when display configuration comes from main parameters] and a ReInit global var, which I set when buttons are pressed, before ordering reloadEFS and hoping it will be found next time main is called. Apparently works, but had some "strange" behaviour, must observe more in RT.

            ALLBARS was a convenient way to cover all situations and it does get generated most of the times, even after reload [I have a trap in my AllBarsFunction to inform me].

            As for CURRENTBAR, I tried to use it to eliminate ticks during busy times [when keep seing the "clepsidra" for long time] but did not work. Still do not have a good solution to this problem and I am forced, sometimes, to shut off the Data Manager and restart eSginal program all together to get out of those endless loops.

            This [the "clepsidra" thing] is the main reason I must do whatever I can to reduce the execution time. This way I must reduce the number of studies I initiate to the minimum I need for a DisplayConfig.
            Good thing I have 10Mb/s Internet and that PC CPU's got faster and faster, because eSignal refused to accept there may be a problem and give us a way to eliminate ticks, if we so desire. The only way we have is with Data object, which is so time consumming in itself that defeats the purpose of "saving time".

            Best regards,
            Mihai Buta

            Comment

            Working...
            X