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

RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA released )



PureBytes Links

Trading Reference Links

would there be a way to make the Say() function be edge triggered or
level triggered?
meaning either only sound at the beginning of a condition or as long
the condition
lasts it sounds?

regards,
Joseph Biran
____________________________________________

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Tomasz Janeczko
Sent: Sunday, December 24, 2006 2:43 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )


'Say' function is designed to be doing one thing: speaking out loud
user-specified text (unconditionally).
 
My experience shows that functions that do more than one thing and do
"housekeeping" on their own
tend to be very difficult to understand by the users (see AlertIf case
- it does housekeeping and 
repeatition prevention, yet no one seems to understand it). So it is
better to keep rule - one function
does one thing.

Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message ----- 
From:  <mailto:jbiran@xxxxxxxxxxx> J. Biran 
To:  <mailto:amibroker@xxxxxxxxxxxxxxx> amibroker@xxxxxxxxxxxxxxx 
Sent: Sunday, December 24, 2006 3:26 AM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )


Thanks,
 
I will try it later this weekend.
 
This seems like a lot of housekeeping for a function that would
normally be 
required only ONCE ! (I can't envision an application that needs
repeating
unless I used it for an emergency (say("Fire") ;) 

happy holidays
Joseph Biran
____________________________________________

  _____  

From:  <mailto:amibroker@xxxxxxxxxxxxxxx> amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Herman
Sent: Saturday, December 23, 2006 3:17 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )



You need to store any text to ouput in a staticvar and clear this
variable after you output it, below is just one way of doing this.  
 This will only Say() text when is has changed.  
You may have to change this when you need repetative messages, like
pyramided trades that say Buy, Buy, Buy, ...
 
 
Text = ParamStr("Enter text to synthesize","Test");
PrevText = StaticVarGetText("PrevText");
if( Text != PrevText ) 
{
Say( Text );

StaticVarSetText("PrevText", text);
}
 
best regards,
herman
 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
Behalf Of J. Biran
Sent: December 23, 2006 1:27 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )


 
Thanks, I may be misunderstanding Flip but my guess is it should be
the opposite,
something like ExRem() to only sound message once on the first
occurrence. 
but I am not even sure what to include in that statement as arrays. 
 
    if condition say("my message");
 
I would like to be said only once (the first time condition is true)
and only on the last bar
(which I will take care of after I figure out how to restrict this
event).

Joseph Biran
____________________________________________ 
  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Chris DePuy
Sent: Friday, December 22, 2006 7:22 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )



I haven't done this yet, but Flip function should work.
 


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

From:  <mailto:jbiran@xxxxxxxxxxx> J. Biran 
To:  <mailto:amibroker@xxxxxxxxxxxxxxx> amibroker@xxxxxxxxxxxxxxx 
Sent: Friday, December 22, 2006 7:02 PM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )




How does one use the say("text") function such that it is only
stated once and does not repeat even if the condition that 
it depends on continues to be true?

Joseph Biran
____________________________________________



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/601 - Release Date: 12/24/2006 11:31 AM