Announcement

Collapse
No announcement yet.

MA Strategy Example Problem

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

  • MA Strategy Example Problem

    We are having difficulties running the MA Strategy backtest example from the esignal.com web site. We have isolated the problem to the retrieval of values from the ema() function.

    In the attached example, we have inserted debugPrintln() to find where the backtest fails. The program never gets past line 89 ("Main Test2a"); ie. it seems to fail at xMA.getValue(-1).

    Any suggestions on what the issue is would be appreciated. Again, this is the sample program from the esignal.com web site.

    Many thanks for any help.
    Attached Files

  • #2
    Re: MA Strategy Example Problem

    beverlycloak
    The efs will not process past line 87 once the script processes the most recent bar.
    This is because of the test for bar index 0 ie
    if (getCurrentBarIndex() == 0) return;
    which is intended to prevent the script from running in real time [as the efs was specifically intended for back testing]
    If you scroll down in the Formula Output Window you will see that the formula does execute in its entirety on historical bars
    Alex


    Originally posted by beverlycloak
    We are having difficulties running the MA Strategy backtest example from the esignal.com web site. We have isolated the problem to the retrieval of values from the ema() function.

    In the attached example, we have inserted debugPrintln() to find where the backtest fails. The program never gets past line 89 ("Main Test2a"); ie. it seems to fail at xMA.getValue(-1).

    Any suggestions on what the issue is would be appreciated. Again, this is the sample program from the esignal.com web site.

    Many thanks for any help.

    Comment


    • #3
      Thanks very much for the reply Alexis. I must be missing something very fundamental still. When we run the script we don't get any output past "Main Test 2a". (And I double checked the entire output.)

      In other words, we do get past the cutoff for the current bar but we do not get past the reference to xMA.getValue(-1).

      I take it that, when you ran the script, you did get output past that specific point. Is it possible there is a configuration issue on our side?

      If you or anyone else has any other suggestions they would be appreciated.

      Thanks.

      Comment


      • #4
        beverlycloak
        That is correct. On historical bars I also get prints for Main Test 2b, Main Test 2c and Main Test 3 as you can see in the screenshot enclosed below and as far as I can see the formula is working fine [again as shown in the same screenshot]
        You may need to provide some more details on the version of eSignal you are using, the symbol, interval, time template settings, etc so that others can try to replicate the same [or similar] conditions
        Alex




        Originally posted by beverlycloak
        Thanks very much for the reply Alexis. I must be missing something very fundamental still. When we run the script we don't get any output past "Main Test 2a". (And I double checked the entire output.)

        In other words, we do get past the cutoff for the current bar but we do not get past the reference to xMA.getValue(-1).

        I take it that, when you ran the script, you did get output past that specific point. Is it possible there is a configuration issue on our side?

        If you or anyone else has any other suggestions they would be appreciated.

        Thanks.

        Comment


        • #5
          Thanks again Alexis. This was not making any sense so I decided to change operating systems and it worked.

          It appears that the problems we experienced were related to running esignal under Vista. When we switched to Windows7 our current problems went away.

          Appreciate the help.

          Comment


          • #6
            beverlycloak
            When running eSignal in Windows Vista and Windows 7 you need to make sure that you have eSignal and the Data Manager set up as per this or this article
            Alex


            Originally posted by beverlycloak
            Thanks again Alexis. This was not making any sense so I decided to change operating systems and it worked.

            It appears that the problems we experienced were related to running esignal under Vista. When we switched to Windows7 our current problems went away.

            Appreciate the help.

            Comment


            • #7
              Thanks for the help Alexis. Although I am having some problems with esignal hanging under Vista, it is now giving correct results.

              Many thanks.

              Comment


              • #8
                beverlycloak
                You are most welcome
                Alex


                Originally posted by beverlycloak
                Thanks for the help Alexis. Although I am having some problems with esignal hanging under Vista, it is now giving correct results.

                Many thanks.

                Comment

                Working...
                X