AFL Code to change Timing in Analysis

asnavale

Well-Known Member
#14
Thank you.

I tried but couldn't get much..I would appreciate if you can write the code for me. Thanks.
Hi Vicky,

What code you need? Code for Alert via email? Please clarify. I will try.

-Anant
 
#16
Thank you.

I tried but couldn't get much..I would appreciate if you can write the code for me. Thanks.
dear vicky,

no need to write afl code.do this one

first in toolbar menu go analysis>automatic analysis
second in automatic analysis>settings>general>periodicity
as you want periodicity

go an done
 

asnavale

Well-Known Member
#18
Thank you Anant

I need alert via e-mail. I don't think alert by SMS is possible yet. E-mail alert will be fine.

Thanks
Hi Vicky,

Here is what you should do for e-mail alerts. (SMS is not possible):

In the AFL you can add the code as suggested by kgsirsangi. You may modify the lines a bit as follows if you set alerts for more than one ticker:

AlertIf( Buy, "Email", "BUY triggered for " + Name(), 1,1+2 );

AlertIf( Sell, "Email", "SELL triggered for " + Name(), 2 ,1+2);

In addition you should set up the e-mail alert in preferences. I have explained the steps below through Screen Shots:






If you need any further clarifications, please do not hesitate to post here.

-Anant
 
#19
Anant,

Thank you for providing solution for email alert.
After configuring amibroker preferences,, I put afl line as follows

AlertIf( Buy, "Email", "BUY triggered for + SENSEX()", 1,1+2 );

This worked and email message for SENSEX was received in outlook express (As BUY had triggered in last bar in my database).

Thanks.
 
#20
Dear Anant

Thanks a lot...I did setup e-mail pref. and tested them too.

my code for Nifty is $nifty-nse and scrips as reliance.eq-nse (example) since I am using live esignal data.

AlertIf( Buy, "Email", "BUY triggered for NIFTY." + Name(), 1,1+2 );

Will it be like this ?? Will it also email the price at which signal is generated? also let me know once i put the code how can i back test it? (since its offline market hours) ? anything with bar replay function?

Btw, nice AFL in your example :)

thanks for all the help
 

Similar threads