Announcement

Collapse
No announcement yet.

Load an EFS on Condition

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

  • Load an EFS on Condition

    Can you load an efs file on a condition (then exit out of it)

    Like if it met all conditions then. load a certain script, run it then exit out of it or unload it completely.

  • #2
    PATRADER
    See this reply to a similar question
    Alex

    Comment


    • #3
      do you mean like a call ??

      ie
      if there is a moving average crossover then call a separate efs ??

      once the called efs has completed it will no longer run until the condition is completed again.

      Comment


      • #4
        NOt good

        from reviewing the other posts, looks like it can only be done manually. I was looking for a script to run once (like if close(0) > open(0) then run example.efs once the exit out of example.script.

        I just wont worry about this for now - thanks

        never used call before???

        Comment


        • #5
          ok, if you ever decide to use it then I would do it like this

          if (close(0) > open(0)) call("dothis.efs")

          everytime the condition is true, then it would call dothis.efs and
          then return back to the script, once its done what is needed in
          the called efs.

          Comment


          • #6
            So then

            I used wizard along time ago and used the editor to do the rest, which was about 90% more...here is a quick example....

            so then I would:
            //{{EFSWizard_Expression_1
            if (
            low(0) > low(-1) &&
            high(0) < high(-1) &&
            ) onAction1();

            //{{EFSWizard_Action_1
            function onAction1() {
            drawTextRelative(0, low()-.055, "Alert", Color.RGB(255,255,0), Color.RGB(0,0,0), Text.FRAME, "Arial", 8);
            call(alertme.efs)
            vLastAlert = 1;


            so all I have to do then is add the call(alertme.efs)???

            is the code right for that

            Comment


            • #7
              looks good to me

              just need to add the quotation marks, the alertme.efs should be in the same directory as the calling efs

              call("alertme.efs")

              Comment

              Working...
              X