Login or Sign Up
Logging in...
Remember me
Log in
Forgot password or user name?
or
Sign Up
Log in with
Search in titles only
Search in EFS Studies only
Search
Advanced Search
Forums
Articles
Groups
Member List
Forum
EFS Development
EFS Studies
Announcement
Collapse
No announcement yet.
Macd Crossover
Collapse
X
Collapse
Posts
Latest Activity
Photos
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
jigsaw
Registered User
Join Date:
Aug 2003
Posts:
1
Share
Tweet
#1
Macd Crossover
08-17-2003, 01:03 AM
I wish to add an audio alert to the MACD crossover. Is it possible this formula exist?
Highfield
Registered User
Join Date:
Aug 2003
Posts:
67
Share
Tweet
#2
08-17-2003, 08:03 AM
In the file library, there is an EFS script called MACD X-over.efs. In the section of the code (reproduced below) add the line Alert.playSound(filename);
if (vAlert == false) {
if (vMACD1 < vSignal1 && vMACD >= vSignal) { // crossing up
vAlert = true;
AlertCntr += 1;
drawShapeRelative(0, vSignal, Shape.UPARROW, null, Color.RGB(60,179,113), Image.TOP | Image.ONTOP, "Alert" + AlertCntr);
Alert.playSound("ding.wav"); // Play sound file
}
if (vMACD1 > vSignal1 && vMACD <= vSignal) { // crossing down
vAlert = true;
AlertCntr += 1;
drawShapeRelative(0, vSignal, Shape.DOWNARROW, null, Color.RGB(255,104,32), Image.BOTTOM | Image.ONTOP, "Alert" + AlertCntr);
Alert.playSound("dong.wav"); // Play sound file
}
} else {
if ((vMACD1 < vSignal1 && vMACD < vSignal) || (vMACD1 > vSignal1 && vMACD > vSignal)) {
vAlert = false;
removeShape("Alert" + AlertCntr);
}
}
Last edited by
Highfield
;
08-17-2003, 08:05 AM
.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment