Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 05-05-2009, 02:41 PM   #1

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Adding Sound to Your Indicator (EasyLanguage)

This thread is about Adding Sound to your Indicator (EasyLanguage)



syntax:

PlaySound

Plays the specified wave (.wav) sound file.

Usage

PlaySound("PathFilename")

Where: PathFilename - a string expression specifying the path and filename of the wave file to be played

Example

Play ding.wav sound file located in the root directory of the C: hard drive:

PlaySound("C: \ding.wav");




source: EasyLanguage manual
Tams is offline  
Reply With Quote
The Following 3 Users Say Thank You to Tams For This Useful Post:
aaa (05-07-2009), addvalue (12-27-2009), Eiger (05-06-2009)
Old 05-06-2009, 07:31 AM   #2
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

I was missing alerts for my strategy exit.

If it is intrabar and works in signal , that's very interesting

Because alert plays at the end of the bar... sometimes that's too late.

And repeat is quite boring.
aaa is offline  
Reply With Quote
Old 05-06-2009, 08:29 AM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

you can configure the sound criteria in ALERT.

pls see attached.


.
Attached Thumbnails
Adding Sound to Your Indicator (EasyLanguage)-alert.gif  
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
aaa (05-06-2009)
Old 05-06-2009, 08:42 AM   #4
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

Right now the alert says "support 1 mn" every seconds during 1 mn...

Stressing, specially now with a terribly bullish market (2.60 % and NY opens in 1 hour)

This alert should be better if it starts only once in intrabar

I will test your solution
aaa is offline  
Reply With Quote
Old 05-06-2009, 09:09 AM   #5
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

Please TAMS , Next topic = regression channel

The chart shows the end run of a huge wave

Question =

Could it be possible to cross the higher trendline ?

The regression channel has the answer ?

Market is like a donkey trying to reach the carot line
Attached Thumbnails
Adding Sound to Your Indicator (EasyLanguage)-untitled-1.jpg  
aaa is offline  
Reply With Quote
Old 05-06-2009, 09:26 AM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

Quote:
Originally Posted by aaa »
Please TAMS , Next topic = regression channel
...

I think there are already a few threads on that.
but you can always start a new thread.

;-)
Tams is offline  
Reply With Quote
Old 05-06-2009, 11:14 AM   #7
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

I've done that

Code:
// Alert
	
	if Value1 > Value1[1] 		then
	             PlaySound("D:\MyPath\Audio\support 1 mn.wav"); 
//		Alert( " Support" 		);
it is like this

Quote:
you can configure the sound criteria in ALERT.

pls see attached.
Each time the condition is true it plays the sound like this during 1 mn

support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn support 1 mn...

aaa is offline  
Reply With Quote
Old 05-06-2009, 11:37 AM   #8

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Adding Sound to Your Indicator (EasyLanguage)

The playsound is repeated...
because every time a tick came through, the conditional statement is evaluated.
if the condition is true... then the Playsound statement is executed.

to make the sound play once only, you have to add a few things...


Code:
input:
soundon(true);

var:
play.once(0);


if  Value1 > Value1[1]
and soundon and play.once <> currentbar then
begin
	playsound("C:\soundfiles\support 1 mn.wav");
	play.once = currentbar; 
end;
Tams is offline  
Reply With Quote

Reply

Tags
alert, easylanguage, playsound, sound, warning

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
EasyLanguage Indicator -- How Long (in Min) 1500 Tick Bar Took to Complete Frank Coding Forum 3 03-16-2010 10:47 AM
[Site Update] Adding Images in Post - New Function Soultrader Announcements 0 04-20-2009 05:05 AM
ADX Level Sound Alert Indicator for MT4 snoman Trading Indicators 0 02-11-2009 05:04 AM
Hate to sound like a broken record Don4 Support Center 24 06-26-2007 11:02 PM

All times are GMT -4. The time now is 01:09 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.