Announcement

Collapse
No announcement yet.

back testing

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

  • back testing

    I have a very simple trading idea and would like to be able to back test it.

    Where can I get some info on writing the needed formula.

    Bruce

  • #2
    Bruce
    in the EFS Help Center and Library there is a section called Guide to Developing EFS Stratgeies and another one called Back Testing Help
    Alex

    Comment


    • #3
      Alex:

      Is there a section where there are back testing studies/systems already completed?

      I wanted to start off with a simple parabolic study/system and go from there (aways in the market and reverse when the parabolics change (actually reverse on the open of the 2nd bar)?

      Bruce

      Comment


      • #4
        Bruce
        You should have a few efs already in the Back Testing subfolder of your Formulas folder. Those should give you an idea of the construct.
        Also do a Search in the Bulletin Board as there have been many posts with examples regarding this topic.
        Alex

        Comment


        • #5
          I had this on my PC from awhile back. It just may do the trick.
          Attached Files
          Regards,
          Jay F.
          Product Manager
          _____________________________________
          Have a suggestion to improve our products?
          Click Support --> Request a Feature in eSignal 11

          Comment


          • #6
            Jay:

            Thanks....

            I was wondering how I could enter on the 2nd bar versus the next bar.

            Also, how do I go about doing some back testing and generate reports?

            Bruce

            Comment


            • #7
              To intiate the trade one more bar out, you will need to check for the condition against one bar prior then what's currently being processed. Using the code already posted make this change to lines 43-46.

              PHP Code:
                 if (vTrend == null) {
                      if (
              study.getValue(ParabolicStudy.STOP,-1) >= high(-1)) vTrend "Down";
                      if (
              study.getValue(ParabolicStudy.STOP,-1) <= low(-1)) vTrend "Up";
                  } 
              Regards,
              Jay F.
              Product Manager
              _____________________________________
              Have a suggestion to improve our products?
              Click Support --> Request a Feature in eSignal 11

              Comment


              • #8
                Also line 49 and 67 will need to be changed in the same fashion. Just be sure to change the nSAR part and not the vTrend part.
                Regards,
                Jay F.
                Product Manager
                _____________________________________
                Have a suggestion to improve our products?
                Click Support --> Request a Feature in eSignal 11

                Comment


                • #9
                  Jay:

                  I'm very new to programing and I think I've done your corrections incorrectly.

                  Could you take a look at it and give me some suggestions.

                  Bruce
                  Attached Files

                  Comment


                  • #10
                    This should do the trick. I cleaned up the code alot, and just simplified it.
                    Attached Files
                    Regards,
                    Jay F.
                    Product Manager
                    _____________________________________
                    Have a suggestion to improve our products?
                    Click Support --> Request a Feature in eSignal 11

                    Comment


                    • #11
                      Jay:

                      Looks great but it seems to enter on the 3rd bar.....

                      Anyway to get it to enter on the open of the 2nd bar?

                      Bruce

                      P.S. I would prefer not to use a market order....either open or close.

                      Comment


                      • #12
                        Here's the corrected version. I misunderstood what you were looking for. As a quick FYI, Strategy.MARKET uses the opening price. To use this in the back tester, right-click a chart you wish to apply it to, then select Tools --> Back Testing...
                        Attached Files
                        Regards,
                        Jay F.
                        Product Manager
                        _____________________________________
                        Have a suggestion to improve our products?
                        Click Support --> Request a Feature in eSignal 11

                        Comment


                        • #13
                          Jay:

                          Thanks you've been very helpful.

                          One last thing:

                          I use 24 hr data but only trade from 6:30 - 12:30 PST.

                          Is it possible to only enter trades after 6:30 and exit all open positions at 12:30.

                          Bruce

                          P.S. I was unable to find anything that would show me how to to a time period in the study.

                          Bruce

                          Comment


                          • #14
                            Jay:

                            I just viewed one of the reports and it looks like it's only taking the long trades (not real sure I'm correct on this).

                            I'd like to be able to enter on the 1st parabolic change after the market opens (5:20 ZN - 6:30 ES) and SAR each time the parabolics change.....along with exiting all open positions at the end of the day (1:15).

                            Hope you can help.

                            Bruce

                            Comment


                            • #15
                              I'm not great at working with time based trades. Hopefully, someone else can step in and assist with that.

                              There was one remaining bug on line 38. Instead of Strategy.doShort(), which will close and reverse the position, it was using Strategy.doSell, which was just closing the position.
                              Attached Files
                              Regards,
                              Jay F.
                              Product Manager
                              _____________________________________
                              Have a suggestion to improve our products?
                              Click Support --> Request a Feature in eSignal 11

                              Comment

                              Working...
                              X