Pop Up/ Alert window in Amibroker

#1
Hi Friends,

I wish to add PopUp window to my afl. For example:

Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

Now I want that when BUY is generated, a pop up window is generated displaying a custom text (for eg. BUY - MACD Crossed Upwards) in custom colour (Green for Buy and red for sell). Seniors please help me in how I can add the same to my AFL.

Thanks

Sanjeev Bhatia

P. S. I Don't want to use AlertIf function since the alert is displayed in alerts window. I need a pop up window.
 
Last edited:
#2
Use the following to get a pop up

PopupWindow( bodytext, captiontext, timeout = 5, left = -1, top = -1 );

where the parameters are

bodytext - the string containing the text of the window body
caption - the string containing the text of window caption
timeout - auto-close time in seconds (default 5 seconds)
left - top-left corner X co-ordinate (default = -1 -means auto-center)
top - top-left corner Y co-ordinate (default = -1 - means auto-center)

so u can put a IF condition... if (BUY){ //code for pop up // }
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?