I am trying to write an alert (low volume), but I want the alert to come at the close of the bar (5 minute) - how can this be done in the Formula Wiz?
Announcement
Collapse
No announcement yet.
Alert on bar close???
Collapse
X
-
lassiter
This can't be done yet in the Formula Wizard.
However once you have completed and saved the formula with the Formula Wizard, then open it with the Editor and add the following statement in the function preMain() section.
setComputeOnClose()
Alex
-
OK, I give up - this is what I have:
function preMain(){
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
setPriceStudy(true);
setComputeOnClose(true);
setStudyTitle("duv");
//}}EFSWizard_PreMain 6130
}
...but it's not working - what am I doing wrong???
Comment
-
lassiter
Does the alert work if you rem the setComputeOnClose() statement?
If yes then this could be the same issue others have reported where the setComputeOnClose prevents alerts from working.
If no then you might want to post the efs or the code and someone can take a look at what could be a reason.
Alex
Comment
-
lassiter,
You may want to try the current beta release. This has a few improvements/corrections to the setComputeOnClose function, and could solve your issue. If it does not, then there are ways of doing the setComputeOnClose equivalent with checking the getBarState() for BARSTATE_NEWBAR. For instance...
PHP Code:if (getBarState() == BARSTATE_NEWBAR) { // is true when a new bar is created.
// .. insert your alert code here
}
Regards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
Comment