Hello,
I am trying to get an Alert Event when a Renko box Changes Direction/Color
Below is my EFS but it is not working can someone point me in the right direction?
Thanks for the Help
EK
I am trying to get an Alert Event when a Renko box Changes Direction/Color
Below is my EFS but it is not working can someone point me in the right direction?
PHP Code:
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vLastAlert = -1;
//}}EFSWizard_Declarations 2482
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(true);
setStudyTitle("Renko Alerts");
//}}EFSWizard_PreMain 7269
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
if (
close() > close(1) &&
close(1) < close(2)
) onAction1()
//}}EFSWizard_Expression_1 9837
//{{EFSWizard_Expression_2
else if (
close() < close(1) &&
close(1) > close(2)
) onAction2();
//}}EFSWizard_Expression_2 12820
//}}EFSWizard_Expressions 44040
//{{EFSWizard_Return
return null;
//}}EFSWizard_Return 2256
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
Alert.email("", "Renko Change");
Alert.playSound("I:\\Program Files\\eSignal\\Sounds\\Hey Boy Sound.wav");
Alert.addToList(getSymbol(), "", Color.RGB(0,0,0), Color.RGB(195,0,0));
vLastAlert = 1;
}
//}}EFSWizard_Action_1 29866
//{{EFSWizard_Action_2
function onAction2() {
Alert.playSound("I:\\Program Files\\eSignal\\Sounds\\Hey Boy Sound.wav");
Alert.email("", "Renko Change");
Alert.addToList(getSymbol(), "", Color.RGB(0,0,0), Color.RGB(195,0,0));
vLastAlert = 2;
}
//}}EFSWizard_Action_2 29914
//}}EFSWizard_Actions 79752
EK
Comment