[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [amibroker] Re: Playing .wav files



PureBytes Links

Trading Reference Links

Title: Re[2]: [amibroker] Re: Playing .wav files


Thank you very much Tomasz, that works nicely! fwiw, Here is my testing code (for RT applications):


function Play( filename ) 

    AlertIf1"PLAY " + filename, ""000 ); 


RequestTimedRefresh1 );

Test = ParamTrigger"Sound Test""Sound Test" );

MArketOpeningTime = ParamTime"Market Opening Time""09:29:55" );

MArketCloseTime = ParamTime"Market Closing Time""16:00:00" );


Now4 = Now4 );


PrevInRTH         = NzStaticVarGet"InRTH" ) );

InRTH         = Now4 >= MArketOpeningTime AND Now4 <= MArketCloseTime;

StaticVarSet"InRTH", InRTH );


StartRTH         = InRTH > PrevInRTH;

EndRTH         = InRth < PrevInRTH;


if ( StartRTH OR Test )

{

    Say"Market Opens" );

    Play( "F:\\Program Files\\AmiBroker\\SoundFiles\\Openingbell.wav" );

}


Title = Now();


herman



Saturday, September 19, 2009, 8:38:28 AM, you wrote:






Hello,

 

Here it is your Play function:

 

function Play( filename ) 

    AlertIf1"PLAY " + filename, ""000 ); 


Play("c:\\windows\\media\\ding.wav"); 


Best regards,

Tomasz Janeczko

amibroker.com

----- Original Message ----- 

From: Herman 

To: booker_1324 

Cc: amibroker@xxxxxxxxxxxxxxx 

Sent: Saturday, September 19, 2009 10:05 AM

Subject: Re: [amibroker] Re: Playing .wav files


Yes that works for testing, but i would like to add quality sounds to my automatic trading system, like the sound of the opening and closing bell, a happy sound when there is a winner and a downer when there is a loser. I can use voice but voice message produced with Say() often sound terrible and their duration if often too long. Distinctive sounds will reveal much better what is going on and will be a lot more fun to listen to. Sound feedback is essential when you work on one computer and run your system in the corner of your office, out of sight, on another.


For some reason I always have trouble with AlertIf(), it is too complex (for me). I am looking for a simple Play() function, perhaps someone wrote a DLL? Is there any way to do this by calling js?


Thanks,

herman



Friday, September 18, 2009, 8:14:24 PM, you wrote:


> I just double click on the file name and it plays thru Windows Media




> ------------------------------------


> **** IMPORTANT PLEASE READ ****

> This group is for the discussion between users only.

> This is *NOT* technical support channel.


> TO GET TECHNICAL SUPPORT send an e-mail directly to 

> SUPPORT {at} amibroker.com


> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at

> http://www.amibroker.com/feedback/

> (submissions sent via other channels won't be considered)


> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

> http://www.amibroker.com/devlog/


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-digest@xxxxxxxxxxxxxxx 

>     mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx


> <*> To unsubscribe from this group, send an email to:

>     amibroker-unsubscribe@xxxxxxxxxxxxxxx


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/








__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___