How to incorporate Alert in AFL

SwingKing

Well-Known Member
#2
Rajeabc,

This should help. You can use this in real time or as an exploration.

Tc


Buy = Cross(MA(Close,20), MA(Close,50));

AlertIf( Buy, "", "Simple text alert", 4 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 ); // Put link of sound file on your Pc

Filter = Buy;

AddColumn(Close, "Buying Price", 1.2);

 

rajeabc

Well-Known Member
#3
Rajeabc,

This should help. You can use this in real time or as an exploration.

Tc


Buy = Cross(MA(Close,20), MA(Close,50));

AlertIf( Buy, "", "Simple text alert", 4 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 ); // Put link of sound file on your Pc

Filter = Buy;

AddColumn(Close, "Buying Price", 1.2);


Hi Raunak ,
Thanks a lot for your reply.
Could you please let me know whether it will work for Intraday ( On time frame of 1 min . So it would be when SMA(20 mins) cross SMA(50mins) ?)..

Will this Text alert appears in a new pop up window ?

Thanks
 
#4
Hi Raunak ,
Thanks a lot for your reply.
Could you please let me know whether it will work for Intraday ( On time frame of 1 min . So it would be when SMA(20 mins) cross SMA(50mins) ?)..

Will this Text alert appears in a new pop up window ?

Thanks
Run the bar replay and you will see
 

SwingKing

Well-Known Member
#5
Hi Raunak ,
Thanks a lot for your reply.
Could you please let me know whether it will work for Intraday ( On time frame of 1 min . So it would be when SMA(20 mins) cross SMA(50mins) ?)..

Will this Text alert appears in a new pop up window ?

Thanks
Dear Rajeabc,

Yes it will work on any time frame.

Let me know if there is any problem.

Tc
 

SwingKing

Well-Known Member
#7
Raunak ,

I tried this and it is working fine except in few cases.
It is missing few alters and some time no alert unless I go and click on that stock's chart.
Cold you please help me to resolve this..
Below is the snapshot of setting I have done.



Uploaded with ImageShack.us
Dear Rajeabc,

Sorry for the delay in replying.

Your setting are correct. Seems you want to run alert only for stocks which are in FnO segment. I fail to understand why it is skipping alerts for some stocks. I'll show it to one of our guys in the office. He knows Amibroker in and out. Hopefully he should be able to resolve it.

Will get back to you tomorrow.

Tc
 

SwingKing

Well-Known Member
#8
Dear Rajeabc,

I showed this to someone in our office and he said it should work fine with every symbol.

He has suggested to build a new database and import the symbols and try again. Other than that he said nothing can be wrong.

Tc
 

rajeabc

Well-Known Member
#9
Dear Rajeabc,

I showed this to someone in our office and he said it should work fine with every symbol.

He has suggested to build a new database and import the symbols and try again. Other than that he said nothing can be wrong.

Tc
Raunak ,

Thanks for your reply. I appreciate.

Actually I did some more search on google and found that it is a bug. Intermittent bug ...
Solution , if I restart it should work fine but it may get hanged again..

Thanks Again
 

rajeabc

Well-Known Member
#10
Dear Rajeabc,

I showed this to someone in our office and he said it should work fine with every symbol.

He has suggested to build a new database and import the symbols and try again. Other than that he said nothing can be wrong.

Tc
Raunak ,

Just for your information as your helped me on this issue.Also you may get same query again in future.

What I have observed

- Alertif has got some bugs.. Found it on google.
- But Automatic analysis works fine . I have noticed that Audio alert are more accurate and appear even on Realtime alert window. Text do not .
- To run Automatic analysis which generate signals for 3 mins chart we need to set time frame as required in AFL. Without setting time frame Automatic Analysis will only give signal on EOD basis though generate in real time but on EOD candles and conditions.

So to get real time alert setting should be
- Set time frame in your AFL
-Use AUDIO alert
_ On Automatic Analysis window , select watch list on which you want to run this
- set time interval to run automatic analysis.This could be different from Times frame in AFL. Say if you run it every 10 mins then it will have signals generated in last 10 mins based on 3 mins chart
- Open alert output window if want to see text.

all set.
 

Similar threads