Announcement

Collapse
No announcement yet.

getValue bug?

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

  • #16
    It is because length is not a method, it is an array property. Here is a link to an Array Tutorial

    Originally posted by futurenets
    ok thanks Wayne.

    I wanted to find out why the script ended prematurely when I try and find the length of the array ...

    var len = aClose.length();

    Comment


    • #17
      not sure how that helps?

      I wanted to find out why the script ended prematurely when I try and find the length of the array ...

      var len = aClose.length();
      Paul Williams
      Strategy & Applications
      www.futurenets.co.uk

      Comment


      • #18
        also Wayne makes some interesting comments.

        could eSignal please take a look.
        Paul Williams
        Strategy & Applications
        www.futurenets.co.uk

        Comment


        • #19
          sorry Steve, the brackets make no difference ...

          just tried it and the old problem is back again ...

          var aClose = getValue("close", 0, -nLength, sSI);
          produced debug output

          var aClose = getValue("close", -nLength, nLength, sSI);
          does not produce debug output

          var len = aClose.length;
          does not produce debug output

          really need eSignal to look at this otherwise the problem will float around messing up efs code.
          Paul Williams
          Strategy & Applications
          www.futurenets.co.uk

          Comment


          • #20
            futurenets,

            A property is a value. A method is a function that you call using parenthesis.

            If you refer to a property incorrectly, you have a good chance of your script end prematurely.

            Please read the tutorial and let me know if this makes sense.



            Originally posted by futurenets
            not sure how that helps?

            I wanted to find out why the script ended prematurely when I try and find the length of the array ...

            var len = aClose.length();

            Comment


            • #21
              And if that does not work for you, you do not have an array object.

              Originally posted by stevehare2003
              futurenets,

              A property is a value. A method is a function that you call using parenthesis.

              If you refer to a property incorrectly, you have a good chance of your script end prematurely.

              Please read the tutorial and let me know if this makes sense.

              Comment


              • #22
                yes Steve you're right but (without barckets) the probem still exists.

                also this wasn't working, then it was, now it isn't ...

                var aClose = getValue("close", -nLength, nLength, sSI);
                does not produce debug output

                var len = aClose.length;
                does not produce debug output
                Paul Williams
                Strategy & Applications
                www.futurenets.co.uk

                Comment


                • #23
                  ok I'm running out of time so if anyone wants to help, please load the attached efs and post the results here.

                  You'll get an "efs passed" or "efs failed" message.

                  Please keep your response as simple as possible.
                  Attached Files
                  Paul Williams
                  Strategy & Applications
                  www.futurenets.co.uk

                  Comment


                  • #24
                    Thanks Steve,

                    I tested various combinations and they all seems to work on my end. Great tutorial.

                    Wayne
                    Last edited by waynecd; 05-25-2010, 11:10 AM.

                    Comment


                    • #25
                      ok thanks, can I ask if you got "efs passed" ?
                      Paul Williams
                      Strategy & Applications
                      www.futurenets.co.uk

                      Comment


                      • #26
                        2 of my colleagues in the US just got "efs failed" using a 60min ES #F chart.
                        Paul Williams
                        Strategy & Applications
                        www.futurenets.co.uk

                        Comment


                        • #27
                          Alex expended quite a bit of time to demonstrate how your code worked (as you previously had it coded without the Array property reference) earlier in the thread. Then there was the problem with how you were trying to access the Array length property.

                          Wayne was gracious in performing some extensive troubleshooting and he posted his code and his testing results.

                          Seems at this point, the problems you are having are either due to a corrupted workspace, or you are having some other problem(s) that's difficult nor possible to troubleshoot here.

                          Not sure what you should try at this point short of rebooting your machine and performing some systematic and rigorous troubleshooting.


                          Originally posted by futurenets
                          yes Steve you're right but (without barckets) the probem still exists.

                          also this wasn't working, then it was, now it isn't ...

                          var aClose = getValue("close", -nLength, nLength, sSI);
                          does not produce debug output

                          var len = aClose.length;
                          does not produce debug output

                          Comment


                          • #28
                            ok thanks, can I ask if you got "efs passed" ?
                            Paul Williams
                            Strategy & Applications
                            www.futurenets.co.uk

                            Comment


                            • #29
                              futurenets
                              Coded as you posted it it will fail however once you make the change shown in the enclosed animation it will pass every time (as you can see in the animation itself).
                              You may want to search the forum as to why this is as this topic has come up in the past and eSignal has provided an explanation
                              As to all the other examples you have posted throughout the thread they too are working [after making the necessary corrections to your code as per Steve's suggestions]
                              Alex




                              Originally posted by futurenets
                              ok I'm running out of time so if anyone wants to help, please load the attached efs and post the results here.

                              You'll get an "efs passed" or "efs failed" message.

                              Please keep your response as simple as possible.

                              Comment


                              • #30
                                sorry Alex, noticed that you not using a 60min ES #F chart.

                                can I ask if you could please try that.
                                Paul Williams
                                Strategy & Applications
                                www.futurenets.co.uk

                                Comment

                                Working...
                                X