Announcement

Collapse
No announcement yet.

Looking for documentation on using the EFS Object Model / Classe hierarchy etc.

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

  • Looking for documentation on using the EFS Object Model / Classe hierarchy etc.

    I am interested in any information that will enable me to write code using the EFS object / class models as well as built-in objects and classes.

    Thanks

  • #2
    I can offer my experience and assistance if it will help?? What did you want to know?? How do you intend to deploy these within your efs and do you need more than one efs to communicate with others??
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Looking for documentation on using the EFS Object Model

      I would like to develop a "library" of generic functions that can be used by all other scripts i write to save a whole bunch of cut / paste / change debug and call those from other scripts.

      This will enable me to develop some generic logic to be used by many studies as i find myself plagiarizing my own code multiple times for no reason (other than the lack of such library)

      Thanks

      Comment


      • #4
        Then you need to develop an efsLib file. There are a few examples of these in the "FunctionLibrary" folder (within the esignal folder). They operate like "include files" and you can develop functions that return values/arrays (or not) that can be reused over and over within other efs scripts.

        You don't need objects yet unless you want a function to return a specific set of return values. See below..

        PHP Code:

        function mytrendfunction() {
          var 
        MTF = new Array();
           var 
        MTFObj = new Object;
             
        MTFObj.Trend 0;
             
        MTFObj.TrndBar = -99999;
             
        MTFObj.TrndStatus "";
             
        MTF.push(MTFObj);
           
        //  creates an array populated with ONE OBJECT.


            
        if (close(-1) > close(-5)) { 
                
        MTF[0].Trend 1
                
        MTF[0].TrndBar = -1
                
        MTF[0].TrndStatus "Bullish Trend"
            }
            if (
        close(-1) < close(-5)) { 
                
        MTF[0].Trend 1
                
        MTF[0].TrndBar = -1
                
        MTF[0].TrndStatus "Bearish Trend"
            }

          return 
        MTF;
          
        //  This returns the entire array including the single object.
        }



        // in your regular code, you would access the returned values like this.

           
        var vMTF mytrendfunction();

           if (
        vMTF[0].Trend 0) { //  Bullish Trend
           
        }
           if (
        vMTF[0].Trend 0) { //  Bearish Trend
           

        You could also move this function into the FunctionLibrary file (efsLib) and call it from within your existing efs.

        If you have any additional questions, let me know. I know there is a knowledgebase file about efsLib files available, but you'll have to search for it as I don't know where it is. Alex might though and I invite him to post it (if available).

        Hope this helps.
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment

        Working...
        X