Announcement

Collapse
No announcement yet.

reloadEFS()

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

  • reloadEFS()

    I want to use reloadEFS() in a script. My objective is to get the script to reload when I do a chart refresh. Where is the most appropriate place for reloadEFS() so that I don't bog down my cpu or get stuck in an endless looooooop? No place seems to make any sense to me today.

    Some advise from those of you that have experience with this function would be greatly appreciated.

    Thanks.

  • #2
    Gavishti
    Check this thread
    Alex

    Comment


    • #3
      The formula should be reset by a chart refresh (if you mean cntrl->click on OK).

      If you are trying to do something specific other than just running the EFS again against the new data, I would put the reloadEFS() in a check for getBarState() == ALLBARS and put a toggle switch around it so that every other time ALLBARS is called it reloads the EFS.

      bToggle = false;

      function main(){
      if (getBarState == BARSTATE_ALLBARS){
      if (!bToggle){
      bToggle = true;
      reloadEFS();
      }
      bToggle = false;
      }


      Or something like that.

      Garth
      Garth

      Comment


      • #4
        Thanks.

        I do mean Ctrl-click on OK. Because of communications problems I have to hit refresh a lot. After refreshing the data, I currently must manually reload the efs. Wanted to make it a little more automatic.

        The efs runs just fine as long as the data comes in. The problem is that the missing data creates false signals. A refresh doesn't fix the problem. I have to also reload.

        Comment


        • #5
          Hello Gavishti,

          When you do a ctrl + click on OK, any EFS formulas loaded in the chart should also reload at that time. Can you post a couple of before and after images of your formula. Perhaps I'm misunderstanding what your problem is. As far as creating an automatic routine to have the EFS formula reload itself after a manual refresh, the best thing I could come up with for that was discussed in this post. Did this code snippet not do the trick for you? Other than that code example there aren't any methods in EFS that can detect when a user performs a manual refresh.
          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
            Ack! I just realized. Instead of a local global as I described you should make bToggle a universal global (ie: setGlobalValue() and getGlobalValue())...

            Otherwise bToggle will be reset each time also and you will end up in an endless loooooop.

            -Garth
            Garth

            Comment


            • #7
              Jason,

              As shown in that same post, there is an issue with the DM retrieving missing data after a dropped connection. reloadEFS() on its own does not deal with the problem. The chart has to be refreshed to force a call to the server to get the missing data. Although most of the indicators seem to get updated after a refresh, I have noticed a few don't. That is why I wanted to put in a reloadEFS() when I do a refresh. My concern was getting into an endless loop. The code examples provided here look like what I am after.

              I don't have any snapshots. I will try to put together a set and forward to tech support.


              Thanks.

              Comment

              Working...
              X