Announcement

Collapse
No announcement yet.

Stop a EFS script automatically?

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

  • Stop a EFS script automatically?

    Lets say I have 10 to 20 charts open with EFS attached to it.
    For a condition in say 4 out of 20 charts that signals me not to trade on this stock , how do I make a EFS script to stop on any chart to process further ticks automatically?

    I am asking this from performance point of view where I dont want the unnecessary loaded charts and EFS to process the ticks. I dont want to manually stop or close the chart while i am trading in live markets.

    Any clue?

  • #2
    Place the "return" statement within the curly brackets of the condition that signals to not trade the stock.

    For example:

    PHP Code:
    if(pricema){//= don't trade
    return;//stops further execution of the script at this point

    Wayne

    Comment


    • #3
      No Wayne. That wont stop the script. It will continue to process ticks
      and execute your IF clause and then return back. You can verify by
      putting a print statement in your IF just before return clause.
      I want to totally stop the script execution.

      Comment


      • #4
        There is no way through EFS code to disable a script from running again.

        You opted to look at every tick coming into a chart so that's what you got. Either guard your code with an if() so that its execution overhead time becomes trivial or switch some of your logic to check on bar closes only (i.e., setComputeOnClose()).

        Comment


        • #5
          I didn't say it would remove/unload the script. As I commented in the sample script:
          "//stops further execution of the script at this point"

          As SteveH said, I don't know of a way to just remove the study from the chart using an efs. I don't think one is available.

          Consider sending eSignal a suggestion to add this feature.

          Wayne

          Comment


          • #6
            Actually, I suspect you could induce an error that would cause the study to crash, effectively halting execution of the script. Having done this any number of times by accident when creating a script, I'm retry sure this would work.

            The only way to get things going again would be doing a reload...

            Garth
            Garth

            Comment

            Working...
            X