Announcement

Collapse
No announcement yet.

efs doesn't allow more than 3 symbols?

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

  • efs doesn't allow more than 3 symbols?

    hi all,

    i've now read that "efs doesn't allow more than 3 symbols". i'm unsure what that means. i was thinking of a project where that could pose a problem and wanted to make sure before embarking on the project.

    my project involves reading a file with a list of symbols (more than 3). for EACH symbol, i wanted to use "getValueAbsolute()" and do analysis, ONE at a time.

    project
    ------------------
    1. read file
    2. for each symbol in file
    a. do analysis
    b. write result to another file

    is this going to be a problem?
    if so, any suggestion?

    thank you in advance,
    phil

  • #2
    Well, it depends on how you do it I think. If you planned on cycling through one symbol until you reached bar 0, you could in theory, have a block of code that then executes and calls a second symbol for the same number of bars and iterates all those bars all at once. The problem with this approach is that you haven't really done anything to "get rid of" the first symbol. EFS doesn't have the concept of "close symbol stream". So you will quickly get to the three symbol limit.

    OK, so the method I can think of using to do this, is a bit complex. And it uses the reloadEFS() command, which I would use much caution with. But it is basically to wait until bar 0 has been processed as above, and then put up a button for the user to click that would force a reload of the EFS. If you keep track of the number time the formula has run in a universal global, which you don't reset, you should be able to walk your way through all the symbols. I haven't tried this to verify, but it SHOULD work. If you do it this way you should only ever have two symbols open at the same time.

    Note, this would make for a nice way to make a "slide show" of your top stocks, but would be a really poor way to make a scanner for example.

    I could even imagine if you wanted to, you could pop up two buttons at bar 0 - "Forward" and "Back".

    Not sure if all of this is clear...

    Garth
    Garth

    Comment


    • #3
      what i was trying to do:

      function main() {
      var indcurr = getCurrentBarIndex();

      // EXECUTE FROM ANY CHART BUT DO IT ONLY ONCE
      if (indcurr < 0) {
      return;
      }
      //READ FILE
      OPEN FILE
      READ FILE
      LOOP UNTIL END OF FILE
      FOR EACH LINE (line has symbol)
      var vC = getValueAbsolute("Close", 0, 2, "IBM,D");
      for (i = 1; i <= 2; ++i) {
      debugPrintln("i="+i+" indcurr="+indcurr + " close="+vC(-i));
      }

      return;
      }

      Comment


      • #4
        what i was trying to do:

        function main() {
        var indcurr = getCurrentBarIndex();

        // EXECUTE FROM ANY CHART BUT DO IT ONLY ONCE
        if (indcurr < 0) {
        return;
        }
        //READ FILE
        OPEN FILE
        READ FILE
        LOOP UNTIL END OF FILE
        FOR EACH LINE (line has symbol)
        var vC = getValueAbsolute("Close", 0, 2, "IBM,D");
        for (i = 1; i <= 2; ++i) {
        debugPrintln("i="+i+" indcurr="+indcurr + " close="+vC(-i));
        }

        return;
        }

        Comment


        • #5
          trying again... last post posted without pressing "submit", must have pressed some key...

          what i was trying to do:

          function main() {
          var indcurr = getCurrentBarIndex();

          // EXECUTE FROM ANY CHART BUT DO IT ONLY ONCE
          if (indcurr < 0) {
          return;
          }
          //READ FILE
          OPEN FILE#1 FOR READ
          OPEN FILE#2 FOR WRITE
          READ FILE#1
          LOOP UNTIL END OF FILE
          FOR EACH LINE (line has symbol)
          GET LAST 200 BAR CLOSES
          var vC = getValueAbsolute("Close", 0, 200, vsymbol+",D");
          DO ANALYSIS OF 200 CLOSES
          for (i = 1; i <= 200; ++i) {
          debugPrintln("i="+i+" indcurr="+indcurr + " close="+vC(-i));
          }
          WRITE LINE TO FILE#3 (results from analysis)
          END LOOP
          CLOSE FILES


          return;
          }

          Comment


          • #6
            If this can't be done with EFS, is there an API available where I could do this with Visual Basic or Java?

            Comment


            • #7
              It can't be done via EFS in the way that you state there. As I said, it is possible to use universal globals to save state information and then reset the EFS via reloadEFS(), and this **SHOULD** allow you to do what you want. Look at setGLobal() and getGlobal().

              You can call your own .dll files from EFS, but I don't think that will buy you much, as you still have to use EFS to get to the .dll and EFS is what gives the three symbol limit.

              BTW I did hear rumors that the 3 symbol limit was being raised, but if I remember correctly it wasn't by a whole lot. Can anyone from eSignal comment on that?

              Garth
              Garth

              Comment


              • #8
                I just remembered that there is another software (Dynaloader) which can get esignal data directly. They're not using EFS so they must be using some sort of API to access esignal data. I will pose this question to tech support. If anyone knows the answer, I'd appreciate it. Thanks.

                Comment


                • #9
                  Tech Support says someone will get back to me BUT the API is usually reserved for companies, not individuals like me.

                  So pursuing this subject, I have a couple more questions:

                  1. Is setGLobal() and getGlobal() same as setGlobalValue() and getGlobalValue()?
                  What would the syntax be for set/getGlobal for array?

                  2. I assume set/getGlobal allows values to be retained even after reloadEFS(). Can it retain array values?

                  If #2 is Yes, how about the following? The psuedo-code uses set/getGlobal and refreshEFS():

                  function main() {
                  var indcurr = getCurrentBarIndex();

                  // EXECUTE FROM ANY CHART BUT DO IT ONLY ONCE
                  if (indcurr < 0) {
                  return;
                  }

                  GET GLOBAL ARRAY
                  GET PREV-SYMBOL
                  IF PREV-SYMBOL IS NULL
                  OPEN FILE#1
                  READ FILE INTO ARRAY
                  SAVE GLOBAL ARRAY
                  CLOSE FILE#1
                  LOOP ARRAY UNTIL PREV-SYMBOL AND USE NEXT SYMBOL

                  DO ANALYSIS ON LAST 200 BAR CLOSES
                  var vC = getValueAbsolute("Close", 0, -200, vsymbol+",D");

                  OPEN FILE#2 FOR APPEND
                  APPEND LINE TO FILE#2 (results from analysis)
                  CLOSE FILE#2

                  SAVE GLOBAL SYMBOL AS PREV-SYMBOL

                  REFRESH EFS
                  refreshEFS()

                  return;
                  }

                  Comment


                  • #10
                    need help with reloadEFS()

                    hmmm... i didn't get any reply to the last post...
                    so... now i decided i won't use a file to keep the symbols, i'll just hard-code them into an array...

                    however, i need some help with reloadEFS(). the code works as expected with line 26 commented out. When line 26 is executed, the result is... actually i can't figure out what's happening.

                    any ideas?
                    thanks.

                    var symbolList = new Array("IBM","MSFT");
                    var index;

                    function preMain() {
                    setPriceStudy(true);
                    //setComputeOnClose(true);
                    setStudyTitle("test");
                    setGlobalValue("gindex", 0);
                    debugClear();
                    debugPrintln("arraylen="+symbolList.length);
                    }

                    function main() {

                    var indcurr = getCurrentBarIndex();
                    var barstate = getBarState();
                    if (barstate != BARSTATE_NEWBAR) return;
                    if (indcurr < 0) return;
                    debugPrintln("barstate="+barstate+" indcurr= "+indcurr);

                    index = getGlobalValue("gindex");
                    var vsymbol = symbolList[index];
                    debugPrintln("gindex= "+index+" symbol="+vsymbol);

                    var n = 520;
                    var vC = getValueAbsolute("Close", 0, -n, vsymbol+",D"); //line26

                    index++;
                    setGlobalValue("gindex", index);
                    if (index < symbolList.length) reloadEFS();


                    return;
                    }

                    Comment


                    • #11
                      Hi philtong,


                      I wrote some testing scripts to test whether reloadEFS() + setGlobalValue() can bypass the 3-symbol limit. Unfortunately it seems more state information is kept in Esignal, therefore reloadEFS() + setGlobalValue() can not bypass the 3-symbol limit. I think we should keep requesting Esignal to remove that silly limit. The reason I have mentioned in another thread, although I was wrong about reloadEFS() + setGlobalValue(). Unfortunately there is not many people who care about the 3-symbol limit becaue few users replied my thread besides some Esignal people.


                      Clearpicks
                      Last edited by clearpicks; 04-16-2003, 07:49 AM.

                      Comment

                      Working...
                      X