Announcement

Collapse
No announcement yet.

Questions on 7.9.1 efsInternal [1]

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

  • Questions on 7.9.1 efsInternal [1]

    Hi,

    Q1. I was under the impression that we use the same function [with efsInternal] many times, with diferent set of input parameters and generate diferent series.

    Is this true?
    Note: I used the same function 4 times, with diferent sets of parameters, but only the first instance plots for all four. I changed the order and the plots change as well, but still the same for all four series.

    Note: If I create four diferent functions, that I call only once, I get diferent plots, as expected.

    Here is the setups [I use only two iterations]:

    This works [diferent plots]
    function main() {
    study1 = efsInternal("Function1", Param1);
    study2 = efsInternal("Function2", Param2);

    return new Array(study1.getValue(), study2.getValue());
    }

    fucntion Function1(Param) {
    //Calculations
    return Result;
    }
    function Function2(Param) {
    //Same calculations
    return Result;
    }

    This does not work [plots only first instance for both, or all]
    function main() {
    study1 = efsInternal("Function", Param1);
    study2 = esfInternal("Function", Param2);

    same return as above
    }

    function Function(Param) {
    //Same calculations as above
    return Result;
    }

    Thank you.
    Mihai



    Last edited by mbuta; 07-09-2005, 09:13 PM.
    Mihai Buta

  • #2
    Mihai
    Please post working examples so that others can test under the same conditions.
    To answer your question you can call the same function multiple times using different parameters as shown in the image which was created using the enclosed code.
    Alex

    PHP Code:
    function preMain(){
        
    setPriceStudy(false);
        
    setStudyTitle("test");
        
    setCursorLabelName("plot1",0);
        
    setCursorLabelName("plot1",1);
        
    setCursorLabelName("plot1",2);
        
    setDefaultBarFgColor(Color.blue,0);
        
    setDefaultBarFgColor(Color.red,1);
        
    setDefaultBarFgColor(Color.green,2);
    }

    function 
    main(){

        var 
    vPlot1 efsInternal("func1",12,26,9);
        var 
    vPlot2 efsInternal("func1",24,52,18);
        var 
    vPlot3 efsInternal("func1",48,104,36);
        
        return new Array (
    vPlot1,vPlot2,vPlot3);
    }

    function 
    func1(slow,fast,smooth){

        return 
    macd(slow,fast,smooth,0)

    Comment


    • #3
      Alex,

      Thank you for confirmation. I will "digg" more [was not the getValue(0) vs getValue() thing].
      The only diference I see so far from your example is that my inputs are two series, EFS1 study and one declared with efsInternal [prior to using them, of course].

      If unable to find the bug, I will construct a simple efs and submit it for help.

      Thank you again,
      Mihai
      Mihai Buta

      Comment


      • #4
        Mihai

        The only diference I see so far from your example is that my inputs are also series declared...

        That is not apparent from your sample code so I would suggest you put together a complete working example similar to the one I posted.
        Alex

        Comment


        • #5
          Hi,
          I cannot find the bug, if there is any. Can anyone take a look at the attached efs and see what is wrong?
          Note 1: There is a var called "ThisWorks". Switch it between 1 and 0 to get the diferent behaviour, like in the picture below.
          Note 2: Change [when ThisWorks=0] the order of the four efsInternal calls to see that all four plots plot as the first efsInternal call.

          Thank you.
          Mihai



          Attached Files
          Last edited by mbuta; 07-14-2005, 09:18 PM.
          Mihai Buta

          Comment


          • #6
            Mihai
            This is not a bug. The reason you are getting the same return is because efsInternal() and efsExternal() can tell the difference between study parameters only if the studies being passed are EFS2 studies. So for all intents and purposes you are passing only the first Bollinger study with its parameters.
            Shown below is the way I would do it if I were using EFS1 studies. This arrangement will recycle the external function appropriately as can be seen in the image that follows the code
            Alex

            PHP Code:
            function main(){
             
                var 
            xBB1 efsInternal("calc",5,2);
                var 
            xBB2 efsInternal("calc",10,2);
                var 
            xBB3 efsInternal("calc",15,2);
                var 
            xBB4 efsInternal("calc",20,2);
                
                return new Array (
            xBB1,xBB2,xBB3,xBB4);
            }
             
            var 
            vBB null;
             
            function 
            calc(length,stdev){
             
                if (
            vBB == nullvBB = new BollingerStudy(length"Close"stdev);
             
                return 
            vBB.getValue(BollingerStudy.UPPER)-vBB.getValue(BollingerStudy.LOWER);

            Comment


            • #7
              Alex,

              Thank you again for clarifications.
              And gain, I thought we had been told that function called with efsInternal "can have ANY combination of EFS1 or EFS2 studies and any complex calculation".

              Regards,
              Mihai
              Mihai Buta

              Comment


              • #8
                Mihai
                To be precise the statement you are referring to was made by me in this post and was (to quote it in its entirety) "A function or efs becomes a series when called with efsInternal() or efsExternal() and can contain complex calculations, EFS1 and/or EFS2 studies.". Note that the statement was specifically in reply to your asking if "inside that function we can use complex calculations and EFS1 and/or EFS2 studies". As far as I can see that statement is still true irrespective of the fact that you cannot pass to the same external function (or efs) multiple EFS1 studies each using different parameters. Anyhow I believe I provided you with a working solution to your problem.
                Alex


                Originally posted by mbuta
                Alex,

                Thank you again for clarifications.
                And gain, I thought we had been told that function called with efsInternal "can have ANY combination of EFS1 or EFS2 studies and any complex calculation".

                Regards,
                Mihai

                Comment


                • #9
                  Alex,

                  I don't want to generate a "who's right" contest here, because it is not my intention, but I think we deserve more than marketing pitches for the money we pay every months.

                  For three months now I am trying to make sense of these wonderfull EFS2, but keep running into problems.

                  First, I mentioned performance issues and took more than two months for you guys to accept that setSeries deteriorates the performanced.
                  I mentioned the getValue in real time, for external intervals, and still don't know what "correct value" is, because nobody defined and nobody explained anywhere how it can be used for more than just accademic plotting of simple studies.

                  Now I tried to understand how efsInternal works, we were told how easy it is to use it and how many things we can do, when the reality is diferent.

                  Like I said, I believe we dereve more sincere responses. We all understand that the product in not perfect and we appreciate your effort to make it better and better, but just "tell it like it is baby" [as the song goes], because we can live we that, if we decide to stay with eSignal.

                  Sincerely,
                  Mihai
                  Mihai Buta

                  Comment


                  • #10
                    Hello Mihai,


                    Originally posted by mbuta
                    Alex,

                    I don't want to generate a "who's right" contest here, because it is not my intention, but I think we deserve more than marketing pitches for the money we pay every months.

                    For three months now I am trying to make sense of these wonderfull EFS2, but keep running into problems.

                    First, I mentioned performance issues and took more than two months for you guys to accept that setSeries deteriorates the performanced.
                    I mentioned the getValue in real time, for external intervals, and still don't know what "correct value" is, because nobody defined and nobody explained anywhere how it can be used for more than just accademic plotting of simple studies.

                    Now I tried to understand how efsInternal works, we were told how easy it is to use it and how many things we can do, when the reality is diferent.

                    Like I said, I believe we dereve more sincere responses. We all understand that the product in not perfect and we appreciate your effort to make it better and better, but just "tell it like it is baby" [as the song goes], because we can live we that, if we decide to stay with eSignal.

                    Sincerely,
                    Mihai

                    I think that Alex and others have made a sincere effort and have contributed a great deal of their time to address your problems. From my observations you have been given excellent guidance and solutions that should have resolved them if you were able to properly incorporate them into your formulas. If there are any of your threads where you feel the issue or solution is not adequate, please continue to post the details to those threads.

                    Other than that, there isn’t much more anyone can do for you other than program the studies for you, which is beyond the scope of what can be provided for you here in the forums since eSignal does not currently provide custom formula development as a service. Considering the difficulties that you are experiencing and the extensive nature of your formulas, the cost of hiring one of our EFS Consultants to provide the development for you may prove to be very beneficial. However, you are more than welcome and encouraged to continue your learning efforts here in the forums and we will continue to do our very best to assist you.

                    On the topic of getSeries() and deteriorating performance, I believe you have an inaccurate perception of this function (and EFS2 in general) because we do not have an equivalent EFS1 functionality to compare it to. You need to think of EFS2 as an increase in power that requires more fuel (i.e. cpu) rather than degradation to performance. The central increase in the power of EFS2 revolves around the synchronization routine between multiple time frames and external symbols. Because the Advanced Chart does not display zero volume bars, the EFS1 equivalent process for synchronizing the data between intervals and external symbols is far beyond the programming capabilities of our average client. If we were to go through the exercise of developing this process with EFS1 code you certainly see that the EFS2 synchronization process is indeed more efficient and less demanding on cpu. In order to make this synchronization process accessible to our client base we created the Series Object. The EFS2 engine uses this object (and also the getSeries(), efsInternal() and efsExternal() functions) to perform this process in the background for you. This comes at a cost in terms of cpu demands, but I assure you it is still far better than the EFS1 equivalent code. I’m not going to go through the process of developing the EFS1 example for you because it is very extensive and would not be time well spent.

                    EFS2 and the Series Object now make it possible for the average user to create some very complex studies that were not attainable with EFS1 code. There will be some advanced logic to learn and understand compared to what was previous available with EFS1 functionality before you will be able to take full advantage of EFS2. It will not be easy for everyone and we will make our best efforts to make this process easier. Try not to be so quick to blame the software or the EFS2 functionality. We do not by any means try to cover up any bugs by giving you work-arounds or intentionally misleading information. If a bug is discovered that proves to be the source of your problem we certainly want to get these fixed and will immediately report these to Dion and the development team. Many of your messages imply that the problem revolves around the application or the EFS2 functions. I honestly have yet to see the Series Object or any of the EFS2 functionality as the cause of your issues. Your issues revolve around the specifics of your code and what you are expecting to work. A major point to understand about programming is that not every possible combination of logic can be expected to work as you might think it should. It does not automatically mean that you’ve encountered a bug, but a combination of logic that just does not or cannot work as you’re expecting it to. Every programmer deals with this issue, you are not alone. There are endless combinations of logic that can be created. You just need to keep trying until you arrive and the set of logic that does what you are trying to accomplish. All of the examples that have been provided for you appear to do that.
                    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


                    • #11
                      Jason,

                      I agree with everything you say, in particular with the very best effort put by Alex, Dion, you and Steve to clarify issues with EFS2.

                      I am no software expert, by no means, but I am a retired computer architect for IBM mainframes, so I can understand a few things, when properly explained. I am also working with efs since inception, I was a subsriber to Advanced Get, before the merger [which was the main reason I came back from Trade Station].

                      So, before I ask anybody to look at my code, I try everything I can by myself, so I ask questions, usually about features and priciples, which are not explained anywhere yet.

                      I was so excited about EFS2 when you introduced it, because it was supposed to do all those wonderfull things you mentioned, but the fact is that, after three frustarting months, I made almost no progress.

                      Here is a summary of issues that hold me back:

                      1. Inability to use, in real time, EFS2 series for external time intervals, regarless how they are declared.

                      2. Ianbility to convert my internal functions [which work fine in EFS1, but cannot refer to historical values] into EFS2 series.

                      Other than that, everything is fine and I appologize if I affended anybody, it was not my intention.

                      About hiring help: It is planned for, for a later stage, but we would not have many of these discussions if proper documentation was available.

                      Thank you,
                      Mihai
                      Last edited by mbuta; 07-19-2005, 04:34 PM.
                      Mihai Buta

                      Comment


                      • #12
                        Hello Mihai,

                        Originally posted by mbuta
                        Jason,

                        I agree with everything you say, in particular with the very best effort put by Alex, Dion, you and Steve to clarify issues with EFS2.

                        I am no software expert, by no means, but I am a retired computer architect for IBM mainframes, so I can understand a few things, when properly explained. I am also working with efs since inception, I was a subsriber to Advanced Get, before the merger [which was the main reason I came back from Trade Station].

                        So, before I ask anybody to look at my code, I try everything I can by myself, so I ask questions, usually about features and priciples, which are not explained anywhere yet.

                        I was so excited about EFS2 when you introduced it, because it was supposed to do all those wonderfull things you mentioned, but the fact is that, after three frustarting months, I made almost no progress.

                        Here is a summary of issues that hold me back:

                        1. Inability to use, in real time, EFS2 series for external time intervals, regarless how they are declared.

                        2. Ianbility to convert my internal functions [which work fine in EFS1, but cannot refer to historical values] into EFS2 series.

                        Other than that, everything is fine and I appologize if I affended anybody, it was not my intention.

                        About hiring help: It is planned for, for a later stage, but we would not have many of these discussions if proper documentation was available.

                        Thank you,
                        Mihai
                        The information that has been provided for you here in the forums is by far more detailed and specific to addressing your issues than any help document would be able to resolve. Help documentation will only cover the basic concepts and the most common usage and routines. Your issues deal with code that is too specific than what our help documentation will cover. It's unrealistic to expect to find a help document that will cover every possible coding scenario that you might attempt. The amount and scope of possible combinations is simply too large to cover with help documentation alone. That's why we have these forums. To give users a place to ask questions about very specific issues that may not be covered in the knowledgebase information. I'm not disagreeing with on the matter of how much help documentation we currently have. We do need more and more will be added to the EFS Knowledgebase.

                        Regarding your two unresolved issues, I believe they were both addressed or are currently being addressed in the following threads. Please point me to any other threads that I may be missing that are also related to these issues.

                        1. I see that you are currently receiving some help from Steve on this issue in this thread (Erroneous results in real time). I will keep an eye on this thread and provide additional assistance if necessary.

                        2. The most recent code example Alex showed you in this thread looked like an excellent example on converting your EFS1 functions into Series objects using efsInternal(). Once you have the series you can access the historical values using the getValue(barIndex) method of the Series Object as illustrated by Alex in this thread (efsInteranl (enhanced functionality).

                        If you're still having trouble incorporating this information into your formula code, please post some of your specific code and additional details to the appropriate threads and I'll try to provide some additional guidance.
                        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