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

RE: [amibroker] Example code for using Say()



PureBytes Links

Trading Reference Links

Hi Herman,
 
This is great help, I am still working on my own version.
 
Would there be a disadvantage in using a simplified version like:
 
if( Text != "" ) 

   { 

   Say( Text ); 

   Text=""; 

   }

 
(beside simplicity, I am not sure what impact
StaticvariableGetText/SetText have on
performance)
 
I also figured that having just one section like this at the end per
indicator 
(where different signals set text to whatever message at their
respective sections ), 
would avoid the issue of overlapping/truncated messages trying to
fight for a 
single resource.



Joseph Biran
____________________________________________ 

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Herman
Sent: Tuesday, December 26, 2006 12:28 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Example code for using Say()



just FYI I use this type of code in Real-time trading and it seems to
wokr just fine:
 
if(LastValue(Buy))            Text = "Buy, at,
"+NumToStr(BuyPrice,1.2);

else if(LastValue(Short))    Text ="Short, at,
"+NumToStr(ShortPrice,1.2);;

PrevText = StaticVarGetText("PrevText"); 

if( Text != PrevText ) 

   { 

   Say( Text ); 

   StaticVarSetText("PrevText", text); 

   }

 

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
Behalf Of Herman
Sent: December 26, 2006 2:51 PM
To: amibroker@xxxxxxxxxxxxxxx
Cc: Dale@xxxxxxxxxxxxx
Subject: RE: [amibroker] Say message interruption


Perhaps TJ can add a msg queue or a SayStatus() command so that we can
do the queueing ourself. 
You may be able to prevent repeats (using Static variables) and
prevent calling Say() too fast, 
you could insert an automatically minimum call interval, using
GetPerformanceCounter() or 
getStatus("RedrawAction"), that is proportional to the number of
characters in your message.
 
best regards,
herman  

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
Behalf Of Dale Brubaker
Sent: December 26, 2006 2:09 PM
To: AmiBroker@xxxxxxxxxxxxxxx
Cc: Dale@xxxxxxxxxxxxx
Subject: [amibroker] Say message interruption


I love the new Say(text) command in 4.89 Beta, but often the message
is cut off 
(apparently by the next pass through the AFL code) before it can be
completely "uttered". 
Has anyone else seen this problem and figured out how to "buffer" it? 

Thanks,
Dale 
 


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.28/604 - Release Date: 12/26/2006 12:23 PM