Announcement

Collapse
No announcement yet.

real time display but alert only on completed bar

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

  • real time display but alert only on completed bar

    I would like to hv an EFS that can give me display update real time but only give me the sound alert upon completed bar, is it possible? Is it possible to use setComputeOnClose(true) for just part of the codes but not all? thx.

  • #2
    Richard
    You will need to remove setComputeOnClose() and then enclose inside a BARSTATE_NEWBAR statement the sections of the efs that you want to calculate at the completion of a bar.
    If you run a search for alert* you will find several efs that will do just that
    Alex

    Comment


    • #3
      I hv used BARSTATE_NEWBAR before but there are a few points that I need clarification:
      i) when I use it on a 5min chart, sometimes the alerts will be sent out on, say, 12:04:58 and sometimes they will be sent out on 12:05:03. Is this normal?
      ii) Should I use close(-1) for calculation since the bar has just been completed, right?

      thx
      Last edited by Richard Yu; 07-26-2005, 11:23 AM.

      Comment


      • #4
        Richard
        i) I am not sure I understand what those times represent ie bar times or other?
        ii) You should always reference the prior bar
        Alex

        Comment


        • #5
          They are the time shown in the alert list (set by Alert.addToList)...

          Comment


          • #6
            Richard
            That time refers to the system time when the new bar was created and triggered the alert. Depending on how active a security is it can be the same as the bar time or seconds (or even minutes) later ie it is based on when the tick that creates that bar comes in and therefore triggers the alert. In my understanding variances of a second are normal as they are caused by rounding of milliseconds (which eSignal does not display)
            If you want to see the bar time that the alert is referencing add getHour()+":"+getMinute() in the description field of Alert.addToList().
            Alex

            Comment

            Working...
            X