PureBytes Links
Trading Reference Links
|
Here's an example I used to use for highlighting extreme moves in the
TICK indices...
function SayNotTooOften( text, Minperiod )
{
elapsed=GetPerformanceCounter()/1000;
Lastelapsed = Nz( StaticVarGet("lastsaytime") );
if( elapsed - Lastelapsed > Minperiod )
{
StaticVarSet("lastsaytime", elapsed );
Say( text );
}
}
if( LastValue(C)>=800 AND LastValue(C)<=1000)
{
SayNotTooOften("Ticks plus 800",60);
}
if( LastValue(C)>=1000 )
{
SayNotTooOften("Ticks plus 1000",60);
}
if( LastValue(C)<=-800 AND LastValue(C)>=-1000)
{
SayNotTooOften("Ticks minus 800",60);
}
if( LastValue(C)<=-1000 )
{
SayNotTooOften("Ticks minus 1000",60);
}
--- In amibroker@xxxxxxxxxxxxxxx, "Pete" <dryheat3@xxx> wrote:
>
> I searched this forum and the online AFL Reference but did not find
> any examples of using this command within a trading system.
> I have been using the AlerIf() function to play a windows sound when
> one of my signals register on the chart. Very symple, one line of
> code, works great.
> But I would like to include the Say() command in this scheme. The idea
> is to have the Say() command actually tell me which entry signal has
> been triggered. Examples:
> Say("M-A-C-D Cross Long");
> Say("M-A-C-D Cross Short");
> The part I don't yet understand is how to get the Say() command to
> activate when the current bar or last bar in range is showing one of
> the signals.
> Thanks for your input.
>
> Pete :-)
>
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
*********************************
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/
|