Announcement

Collapse
No announcement yet.

calling functions

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

  • calling functions

    Hi some general questions on calling functions.

    I'd like to have one of three efs functions executed, depending on the current Interval ... short, med, long.

    1. for memory usage ... is it better to have all three efs loaded, and just have code that exits if not the desired interval, or one that calls the desired one?

    2. for execution speed ... is it better to load all three efs, or have one that calls the desired one?

    3. for items 1 & 2 above, would it be better to just combine all three efs into one big one?

    4. if one efs function is called as needed, are the other two loaded into memory anyway at chart load time?

    5. I see reference to calling via efsExternal requiring the called efs to be in the same directory. Can this be called anywhere on the hard drive?

    6. any other pointers for code efficiency would be appreciated.

    Thanks
    Mark

  • #2
    functions..

    I don't know about all the "speed and inclusion issues"... but..

    I would think the best solution would be to simply call internal functions (within your single EFS file).. like this...

    PHP Code:

    function main()
    {
      
    //  this is your main program function

      
    if (long) {  fLongFunction();  }
      if (
    short) {  fShortFunction();  }
      if (
    flat) {  fFlatFunction();  }
      


    }


    function 
    fLongFunction() {
       
    // do something
    }

    function 
    fShortFunction() {
       
    // do something
    }

    function 
    fFlatFunction() {
       
    // do something

    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Yes, that is the "large" file way. But I was wondering on the benefits, if any, of a 5 line efs calling these three. Since the three efs files already exist and work.

      Right now, I have the three efs files loaded, and they only show up when the appropriate time frame is active.

      Guess I'll just play with it and see what happens...

      On that note, is there any way to have one efs write to both the price bar area and the indicator area? Or to two indicator areas?

      Mark

      Comment


      • #4
        Mark

        Originally posted by flexie
        On that note, is there any way to have one efs write to both the price bar area and the indicator area? Or to two indicator areas?
        At this time an efs can only write to a single pane.
        You may want to send your suggestion/request for enhancement to [email protected]
        Alex

        Comment


        • #5
          Mark

          Originally posted by flexie
          5. I see reference to calling via efsExternal requiring the called efs to be in the same directory. Can this be called anywhere on the hard drive?
          When using efsExternal() the called efs does not need to be in the same directory. It can be in any directory within the user defined FormulaRoot
          Alex

          Comment

          Working...
          X