First AFL - Intraday Scanner

#1
Hi Traders,

I tried creating my first AFL for old automatic analysis for 15 min time frame but it's working on EOD data only. I want to it scan stocks for buy & sell based on MACD & RSI.

Please have a look at code below and let me know how it will work intraday for 15 min or 5 min charts please.

------------------------------------
MACD_Buy = MACD(12,26)>Signal(12,26,9);

RSI_Buy=(RSI(14)>20 AND RSI(14)<40 );

MACD_Sell = MACD(12,26)<Signal(12,26,9);

RSI_Sell=(RSI(14)<80 AND RSI(14)>60);


SetOption("NoDefaultColumns", True);

AddTextColumn(Name(), "Symbol");
AddColumn(DateTime(), "Date", formatDateTime);
AddColumn(C, "CMP", 1);


Buy = MACD_Buy AND RSI_Buy;
Sell = MACD_Sell AND RSI_Sell;
------------------------------------

It's working on EOD but not on 15 min charts, please share knowledge.

Thanks,
RK
 
#4
Hi,

In Setting of scan select "Periodlcity" of 5min or 15 min

johnny
Thanks for reply johnnypareek.

Right now it show all stocks that are in list but I want to make it show only stocks that fullfill my conditions. Like I have 20 stocks in amibrokers, it shows all 20 stocks either in buy or sell from previous data. But I want it to show only stocks that full fill my condition.

Thanks.
RK
 

johnnypareek

Well-Known Member
#5
Thanks for reply johnnypareek.

Right now it show all stocks that are in list but I want to make it show only stocks that fullfill my conditions. Like I have 20 stocks in amibrokers, it shows all 20 stocks either in buy or sell from previous data. But I want it to show only stocks that full fill my condition.

Thanks.
RK
put below given lines to end of ur afl

buy=exrem(buy,sell);
sell=exrem(sell,buy);

after this u hit scan and not exploer.



johnny