Announcement

Collapse
No announcement yet.

Still have problem with getGlobalValue ...

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

  • Still have problem with getGlobalValue ...

    I would be very grateful for some help here. I have been debugging for days, but cannot get an EFS to successfully retrieve "correct" values previously set in a prior EFS.

    The prior EFS issues two setGlobalValue
    variables (they are also RETURNed by MAIN). I have dumped these values before issuing setGlobalValue, and then I have immediately issued a getGlobalValue and dumped them again: they are identical(as they should be), and they also correctly set by the program logic.

    The later EFS does getGlobalValue of those same two variables, but they both have the value " null " when immediately dumped with debugPrint.

    I have labored over this, to no avail, and am desperate to find my error. Running V7.4 (Build 607).

    I have attached the EFS to this message. Pls note that I have concatenated the two files into one
    Last edited by wombat953; 07-25-2003, 10:03 PM.

  • #2
    I don't see anything attached...

    G
    Garth

    Comment


    • #3
      EFS attached...I hope...

      Is it attached?
      Attached Files

      Comment


      • #4
        I am following this as well. (prior posts on the topic of using EFS with multiple charts generated no solution)

        The code that wombat intended to attach to his post below is here:



        If anyone has links to detailed resources regarding the use and application of setGlobalValue and getGlobalValue (with clean formula examples), please post here:



        Thanks.

        Comment


        • #5
          Hi,

          You have to call the variable the same name in both formula's.
          So in the one doing the getGlobals, use the gvTrendIsUp and gvTrendIsDown names.

          I tried it and it works.

          G
          Garth

          Comment


          • #6
            Thanks!

            Garth - Many, many thanks: you have identified my error and helped me move forward, altho' I feel rather foolish at something so obvious (to another, anway).
            George

            Comment


            • #7
              George,

              No need to feel foolish, I have just worked with this stuff (both EFS in general and universal globals in specific) for a long time now. Glad I could help.

              Garth
              Garth

              Comment


              • #8
                How to test?

                Garth
                I wonder how we can best test this kind of scenario, since the values from the called EFS are always equal to the last returned values.......it's not a "loop within a loop" thing, whereby we get a value from an EFS, apply it to all values in the subsequent chart, and cycle through in this serial manner. Certainly we get a value, but it is the same value, over and over and is equal to the last value of the "outer" EFS. Or is ther some way to pewrform such nested loop processing, taking? I know you have grappled with this in earlier threads.

                Speaking of testing, I feel that some kind of useful debugger is now mandatory for EFS.......

                George

                Comment


                • #9
                  Hi George,

                  There is no simple answer to your question (at least that I can some up with). In the past, after thinking about this for a while, I came up with the idea of writing the time stamped output of one study into a file, which the other file will read and use. This was for historic data only for backtesting purposes. However, there are some issues with this, as you have to make sure you add the formula's to the chart in the right order, and make sure that the first formula executes to completion. Also this clearly will not work if you want to communicate both directions (both are talkers and listeners). Since you are only going one way (one does all the setting and the other the getting) the above may work for you.

                  Ultimately EFS would need some added features for this to work smoothly.

                  1) Ability to sleep wait on a variable
                  2) Ability for a EFS on one interval to call another EFS at an other interval.
                  3) Some sort of EFS master scheduler.

                  Any one of the above would do it, with #2 being the clear winner IMHO.

                  Maybe someone else has better idea's on how to work around this issue.

                  Garth
                  Garth

                  Comment


                  • #10
                    Testing

                    Garth
                    For the purposes of (relatively) quick and dirty testing (and maybe even BackTesting), I can use the new Tools, Data Editor to export all chart data (to an XLS), remove extraneous columns, Save As a text file, and instead of getGlobal Values, I can Readln until eof.

                    As Messala said to Judah Ben Hur after the chariot race:

                    "It goes on (Judah), it goes on........"

                    George

                    Comment


                    • #11
                      Any traders interested in developing an edge based along the lines of this thread (buying after a pullback in a defined uptrend, and vice-versa)please go to my posting on Trading Strategies Forum.

                      I have been working on this strategy for some weeks now in EFS, and the recent Joe diNapoli article in this website seems to confirm the thinking: his method is basically the same, using his own TA indicators, which are also supplied as part of eSignal EFS formula package.

                      Thanks
                      George

                      Comment

                      Working...
                      X