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

[amibroker] Re: Where do you create the formula based alerts ?



PureBytes Links

Trading Reference Links

If you are talking about email alerts I have an include that does that. You can put the functions near the top of your program and just call them when you want to send an alert. 

The attached code will also send an audible alert to your speakers if you have a need to do that.

Barry

// plays an audible message when trade status conditions are met
// this should only play the message once per instance
function fSayOnce( text ) 
{ 
   if( StaticVarGetText(VarPfx + "LastSaidText") != text ) 
   { 
      Say( text ); 
      StaticVarSetText(VarPfx + "LastSaidText", text ); 
      if(DebugOn) _TRACE("#, FeedBkInc, SayOnce Text =" + text + "\n");
   } 
} 

// sends an email alert if the parameter is set to send alerts
// this should only send one alert per instance
function fSendAlertOnce( text ) 
{ 
   if( SendAlert AND StaticVarGetText(VarPfx + "LastAlertSent") != text ) 
   { 
  	AlertIf(True, "EMAIL", Date() +  ", " + text, type = 0 ); 	
      	StaticVarSetText(VarPfx + "LastAlertSent", text ); 
	if(DebugOn) _TRACE("#, FeedBkInc, Alert Text =" + text + "\n");
   } 
} 

 

--- In amibroker@xxxxxxxxxxxxxxx, Ram Nukala <objectsmiths@xxx> wrote:
>
> Hi, 
> I downloaded eval version of the AmiBroker. The Help talks about Formula based alerts (AlertIF function) but it doesn't indicate where this code has to be placed and how to select against which symbols this operates ? 
> 
> 
> Thanks
> Ram
>




------------------------------------

**** 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/