Announcement

Collapse
No announcement yet.

Question on bInit

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

  • Question on bInit

    Alex,

    I've been watching this thread and am curious about your comment
    Lastly you could improve the efficiency of the code by intializing the efsExternal() and getSeries() functions inside a bInit routine
    Can you explain in layman's terms how this makes it more efficient? or is there a kb article on the bInit routine? - Still Learning!

    TIA,

    Kirk

  • #2
    Kirk
    The routine I am referring to (the name bInit or bInitialized is just a commonly used convention for the boolean variable used in the routine) is used to intialize a study once only ie the first time the formula engine iterates through a script.
    The efs engine would actually intialize the study only once even if this were declared locally without the use of that routine however on every tick (ie iteration of the efs) it would have to first check if that study has already been initialized which is less efficient.
    Alex


    Originally posted by zeller4
    Alex,

    I've been watching this thread and am curious about your comment


    Can you explain in layman's terms how this makes it more efficient? or is there a kb article on the bInit routine? - Still Learning!

    TIA,

    Kirk

    Comment


    • #3
      bInit

      Alex,

      Okay, thanks for that explanation...

      I remember seeing ATR and Donchian in the initialization routine, but I don't think I've ever seen MAStudies or other things in the bInit routine. What else is allowed / not allowed inside the bInit? and why?

      thanks again,

      Kirk

      Comment


      • #4
        Re: bInit

        Kirk
        FWIW all the efs included in the EFS2 Custom folder use a bInit routine to intialize the studies.
        There isn't a specific rule as to what is allowed or not allowed. The routine is simply a programming technique to execute a function or command or block of code only one time during the initialization of a formula
        Alex


        Originally posted by zeller4
        Alex,

        Okay, thanks for that explanation...

        I remember seeing ATR and Donchian in the initialization routine, but I don't think I've ever seen MAStudies or other things in the bInit routine. What else is allowed / not allowed inside the bInit? and why?

        thanks again,

        Kirk

        Comment


        • #5
          Thanks, Alex,

          I'll have a look at those in the EFS2 folder.

          I appreciate all your help and direction.

          Sincerely,

          Kirk

          Comment


          • #6
            Kirk
            You are most welcome
            Alex


            Originally posted by zeller4
            Thanks, Alex,

            I'll have a look at those in the EFS2 folder.

            I appreciate all your help and direction.

            Sincerely,

            Kirk

            Comment

            Working...
            X