Announcement

Collapse
No announcement yet.

passing values from advanced chart to advanced chart

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

  • passing values from advanced chart to advanced chart

    How do I pass the results of an efs-study on one advanced chart to be used by another efs-study on a different advanced chart?

    Cheers

  • #2
    You can use global variables to do this (but only in REALTIME) or you can use TEXT FILES to combine historical results between two or more EFS files/scripts.

    Using text files is a bit more work, but if you are trying to combine analysis systems into a single backtesting system, then it's the only real solution..

    On second thought, you could have the "child" analysis models build an array of results, then pass that array to the "parent" efs (using global variables) for use in backtesting. The result will be the same as using a text file, but the method would be different.

    If you need more help, let me know?
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thnaks Brad, I've got that to work.

      Is there a way to set the order that Advanced Charts are processed (particularly so I can make sure the global variable is set from the correct chart before being used by the other chart).

      Comment


      • #4
        Nope. I have code that requires two charts and there is no way to set the order in which efs is loaded/run in esignal. When I reload esignal, I typically have to RELOAD the final script to get the systems to operate properly.
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          I believe I have just found a way to do this. I am new to scripting eSignal, but I have some javascript experience. For your second EFS script, add the following "if" statement in your main() block:

          function main() {
          if (getGlobalValue("id")) {
          your code here
          }
          }

          Comment

          Working...
          X