Announcement

Collapse
No announcement yet.

Syntax question on using EFS2 Custom Indicators for Multiple Tiem Frames

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

  • Syntax question on using EFS2 Custom Indicators for Multiple Tiem Frames

    I want to use the multiple time function option of the new efs studies and my programming skill being a little rusty would appreciate a sample of the correct syntax within a EFS strategy.

    The syntax for the standard study of OscStudy:

    var vPriceOsc5_20 = new OscStudy(5, 20, "Close", false);

    I tried this but get a syntax error:

    var vPriceOsc5_2060 = new Osc(5, 20, "Close", false,,inv(60))


    What would the systax be for the same study using a 60 minute and daily interval.

    I have the same question for StochStudy, ADXDMStudy, and MAStudy.

    Thanks very much.
    Glen Demarco
    [email protected]

  • #2
    demarcog
    You can find the syntax and examples for all the EFS2 built-in studies in the EFS KnowledgeBase under EFS2 Function Reference-> Built-In Study Functions.
    Also in the EFS2 Custom folder of Formulas (on your hard drive) you will find all the EFS2 built-in studies pre-programmed for use with multiple intervals and/or symbols
    Alex

    Comment


    • #3
      Thanks Alex. I read doc and the example for the price oscillator is:

      osc( fastLength, slowLength, bExponential [, source | sym() | inv()] [, barIndex] )


      Is "osc" the correct name of the function?

      I see the code you referred to in the the custom study, but my question is the correct name and syntax to invoke the fuction and pass the time interval parameter, it's not clear to me how to accomplish this. I gave you the statement I was using but it's generating a sysntax error. If you could give me the correct syntax for this one statement I would apperciate it very much..

      thanks again, for all you prompt replies and excellent assistance.
      Glen Demarco
      [email protected]

      Comment


      • #4
        demarcog
        osc() is the name of the function for the Price Oscillator.
        Using your example the correct syntax would be
        var vPriceOsc5_2060 = osc(5, 20, false, close(inv(60)));
        Alex

        Comment


        • #5
          THANK YOU VERY MUCH ALEX YOU ARE THE MAN!!!

          Sorry for my dumb syntax questions, sometimes I look at and work on the code for so many hours my brain zones out, I apprecaite the help...
          Glen Demarco
          [email protected]

          Comment


          • #6
            Still doesn't work, first osc doesn't appear to be the correct function name for price oscillator. When I change it to OscStudy i get past that and then the error is function close can only be invoked in main. Apparently by removing the quotation marks off of close, which I have coded in quotes causes an error.
            Glen Demarco
            [email protected]

            Comment


            • #7
              demarcog
              osc() is the correct name for the EFS2 Price Oscillator function.
              Go to the EFS2 Basic folder of Formulas and open the basicOsc.efs. Then replace the following line
              return osc(10,21,0);
              with
              return osc(5,20,true,close(inv(60)));
              Save the efs with a different name and run it on a (for example) 20 minute chart. FYI that efs with the changes I suggested returns the plot shown in the enclosed chart
              Alex

              Comment


              • #8
                Thanks Alex, that works and can load it into a chart. How would I invoke the new function from within a strategy?
                Glen Demarco
                [email protected]

                Comment


                • #9
                  demarcog
                  Enclosed below is a snippet of code that shows how you would use the function in the context of a strategy. As you can see the logic is no different than that used with EFS1 studies. The only thing that changes slightly is the method used to call the values of a study.
                  I would suggest that you read through this post that explains some of the issues related to using multiple time frames when generating signals, etc for real time and back testing
                  Alex

                  PHP Code:
                  var myStudy osc(10,20,false,inv(60));//declare the study
                   
                  if(!Strategy.isLong()){
                      if(
                  myStudy.getValue(-2)<&& myStudy.getValue(-1)>0){
                          
                  Strategy.doLong(etc etc)
                      }
                  }
                   
                  //IF Strategy is not Long
                      //IF value of 60 min Osc 2 bars back < 0 AND value of 60 min Osc 1 bar back >0
                          //THEN go Long 

                  Comment


                  • #10
                    Thanks Alex. That's exactly what I need. The link you referred me to was very illuminating indeed.

                    BTW, I would imagine that there are fewer people more qualified than yourself to give invaluable insight on what works (if anything) and doesn't work when it comes to profitable intraday trading systems. If you have anything you can share with me I woud appreciate it very much, because after many years of testing thousands of systems I'm about ready to give up.

                    [email protected]
                    Glen Demarco
                    [email protected]

                    Comment


                    • #11
                      demarcog
                      Thank you for the vote of confidence, however I may not be the most appropriate person to ask that question since I am not a system trader - unless you consider the Advanced GET program/methodology as a system (which I do).
                      Anyhow I have been using Advanced GET for the past 8 years and still today I have not found any other program/methodology that I would want to use (or suggest) in its place. For that matter some of its tools or indicators alone (Ellipse, MOB or XTL for example) outclass IMO many of the systems I have seen.
                      You may want to look into that and perhaps attend one of their free seminars
                      Alex

                      Comment


                      • #12
                        Alex,

                        It's been over a year since you suggested Advanced GET I hope your sentiments haven't changed?

                        I subscribed to 2 copies today for myself and colleague based on your recommendation. I have learned through your invaluable assistance and incredible expertise that if there is a higher authority on such issues they probably can also walk on water!

                        Seriously, I'm still developing and running automated strategies that do OK but I've seen your work including dozens of backtesting studies. If after all that research you've come to this conclusion it would be foolish of me not investigate AGET thoroughly.

                        Anyway I've read alot of the material, viewed the introductory study videos and registered for a seminar in April.

                        I'm not quite sure how to proceed as I'd like to spend a few days paper trading intraday using the product and would appreciate any suggestions on how to proceed?

                        Thanks Very Much

                        Glen
                        Last edited by demarcog; 01-18-2007, 09:39 PM.
                        Glen Demarco
                        [email protected]

                        Comment


                        • #13
                          Glen
                          My sentiments regarding Advanced GET have not changed.
                          As you probably have already found out the studies and methodologies available in Advanced GET are numerous and extensive and I believe that the seminar you plan to attend in April will be instrumental in helping you fully understand what Advanced GET is designed to do.
                          In the mean time if you have not already done so I would highly recommend that you attend as many of the Mentoring sessions as possible.
                          Alex

                          Comment


                          • #14
                            Hi Glen,

                            Most of the Advanced GET traders that I've worked with have found a lot of use in attending the Mentoring sessions. I would recommend that you attend as many of these as possible.

                            If you have not yet done so, you may also want to check out some of the Pre-Recorded Foundation Sessions. Hope this helps.

                            Comment


                            • #15
                              Duaneg and Alex,

                              Thank you very much for your recommendations I will definately do so..hope to see you in the room :>)
                              Glen Demarco
                              [email protected]

                              Comment

                              Working...
                              X