Announcement

Collapse
No announcement yet.

setComputeOnClose()

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

  • setComputeOnClose()

    setComputeOnClose()

    This function can only be called from within the preMain() function. When called, it will force the current EFS script to update only when each new bar arrives (as opposed to updating on each new tick).



    Is this still true in 7.9 or can it be called in main() in 7.9?
    Standing on the shoulders of giants.

  • #2
    wildfiction
    AFAIK this is still true in 7.9
    Alex

    Comment


    • #3
      Thanks Alexis - I just noticed that it didn't cause an error if called in main().

      Do the functions that can only be called in preMain() cause errors when called in main()?
      Standing on the shoulders of giants.

      Comment


      • #4
        wildfiction
        With regards to setComputeOnClose() I just tried it and it does seem to work in main(). Also it looks like it can be switched on/off on the fly through a parameter so it does appear to have changed.
        I am not sure about your other question. Jason may be the better person to ask.
        Alex

        Comment


        • #5
          How did you discover that it has a parameter (which I assume is a bool)? The documentation says that it doesn't take one and in the editor it doesn't popup any parameter help...

          Jason: Are you reading this?
          Standing on the shoulders of giants.

          Comment


          • #6
            wildfiction
            I meant to say with a Function Parameter. Sorry for the confusion
            Alex

            Comment


            • #7
              Is it possible to use a button to switch the mode of setComputeOnClose()??? It should be easy to switch it on. But how I can switch it off by pressing a button? Is it possible? thx.

              Comment


              • #8
                Hello Richard,

                You won't be able to do this with a button. However, you can set up a function parameter, as Alex mentioned, that would allow you to switch this on and off via Edit Studies.
                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