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.
Announcement
Collapse
No announcement yet.
real time display but alert only on completed bar
Collapse
X
-
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
-
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?
thxLast edited by Richard Yu; 07-26-2005, 12:23 PM.
Comment
-
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
Comment