is there any way that i can add to indicator CCI(20)to make a sound when it cross above Zero Line?
Announcement
Collapse
No announcement yet.
CCI (20) crossing Zero Line to beep?
Collapse
X
-
sptrader2
The attached efs will play a sound (on the close of a bar only) when the CCI(20) crosses above 0.
All parameters for the CCI can be modified through Edit Studies
AlexAttached Files
-
here we go...
PHP Code://defining the Vars
var vCCI20 = new CCIStudy(20, "Close");
var vLastAlert = -1;
function preMain() {
setPriceStudy(false);
setStudyTitle("CCI-CROSS");
setCursorLabelName("cci", 0);
setCursorLabelName("0", 1);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.black, 1);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
}
function main() {
//CHECK CONDITIONS
if (vCCI20.getValue(CCIStudy.CCI) < 0 && last != 1){
//SOUND
Alert.playSound("C:\\Programme\\eSignal\\Sounds\\Ding.wav");
last = 1;
}
if (vCCI20.getValue(CCIStudy.CCI) > 0 && last != -1){
//SOUND
Alert.playSound("C:\\Programme\\eSignal\\Sounds\\Ding.wav");
last = -1;
}
//RETURN VARS
return new Array(
vCCI20.getValue(CCIStudy.CCI),
null
);
}
hope i could help...
regards erilein
Comment
-
Comment
-
Ths alert will play a single alert once the CCI crosses above or below the zero line (per bar).
It will also play an alert each time the CCI crosses above or below the zero line (each tick).
You can turn the Alert "on" or "off" and also choose between "continuous" or "single" alert in the edit studies window.
Download the ZIP file posted below you will need it for the sigle alert.Attached FilesLast edited by whatever; 03-16-2004, 06:56 AM.
Comment
Comment