Need help for AFL

#11
Hi Beginner,

can you pls let me know a reliable afl formula for day trading? If you have a good afl for Ami 4.8 which I can use in day trading that wud be a great help. I am planning to develop a trading system with the help of MACD, RSI, Stoch etc...

Pls help.

Cheers
Abhi
 

beginner_av

Well-Known Member
#12
hey,

my humble request to u is to read books like trading by the book by joe ross, streetsmarts by connors and LBR ,and find ur own strategy...may be i can help u in coding it.

btw read stockcharts.com on multicollineraity of indicators
 
#13
Hello all,

As I am new to trading (and Amibroker also), I am facing many problems in finding the right scrip which I want to trade. I know Amibroker is a powerful TA software (thanks to those great posts which helped me a lot to set it up correctly). But the sad part it I don't know how to write AFLs (I am learning it slowly). So please help me to setup an AB exploration with the following conditions...

1) Close is near 52 weak low with some upward momentum
2) Avg Volume (last 3 days) > MA Volume (last 50 days)
3) BolBand (20,2) = very narrow
4) EMA(13) just crossed EMA(30)
5) Price>25 AND Volume>50000
6) Please add if I have missed something...

I know there are members in this forum who can solve this puzzle very easily. I thank them in advance. So, please help me with this exploration...

Thanks once again...

Subrata Bera.
 

beginner_av

Well-Known Member
#14
I can give it to you in minutes...but i wont...
my advice...instal powerscan from amibroker web site under 3rd party tools (free)...run it and also see the code generated...then you will know for yourself.
if u face any problem, i'll definitely give u

BTW the first one is ambiguous...u have to first define upward momwentum
 

beginner_av

Well-Known Member
#15
some hints for finetuning?
2. which ma? sma, ema, etc
3. what is very narrow?
4. ema of O H L or C?
5. Price as in O, H, L, C?
6. What is your strategy?
 
#16
Thankyou very much beginner_av for your response. Let's make it a little more clear...

1) Close{Ref(-4,c)} is near 52 weak low and just turned up (The stock is started to move upward in last 2-3 days...)
2) Volume (last 2-3 days) > EMA Volume (last 50 days excluding last 2-3 days)
3) BolBand (20,2) = very narrow (difference between high-low is very less for few day excluding last 2-3 days)
4) EMA(13) just crossed EMA(30)
5) Price>25 AND Volume>50000
6) The stock just picked some momentum.

Hope this helps...

my advice...instal powerscan from amibroker web site under 3rd party tools (free)...run it and also see the code generated...then you will know for yourself.
if u face any problem, i'll definitely give u
I will definitely try that...
 

beginner_av

Well-Known Member
#17
good spirit bera...do u know lil programming? if yes press F1 in amibroker...go to afl functions by categories...click on each of them, read them and see the examples...in no time u'll be able to write simple formulas...then we'll take it further
btw have u used metastock?

the ami syntax is
Ref(C, -4).
lets start with 4. pretty simple one
cond = cross (ema(C,13), ema(C,30));
cond is the condition that u want to test...if u want to generate a buy signal for scan or exploration, use the keyword Buy instead of cond.
 
#18
good spirit bera...do u know lil programming? if yes press F1 in amibroker...go to afl functions by categories...click on each of them, read them and see the examples...in no time u'll be able to write simple formulas...then we'll take it further
btw have u used metastock?

the ami syntax is
Ref(C, -4).
lets start with 4. pretty simple one
cond = cross (ema(C,13), ema(C,30));
cond is the condition that u want to test...if u want to generate a buy signal for scan or exploration, use the keyword Buy instead of cond.
Thanks beginner_av. You are really helpful and inspiring. Yes I know programming (C, C++, VB etc.). I think I will find my answer soon...Keep posting simple examples.
 
#19
As you have suggested, I've created the following afl exploration. Please go through the following afl and suggest modifications (as per my above suggestions)...
// Filter = Ref( LLV( Close, 250 ), -1 ) > Close AND Ref( HHV( Volume, 50 ), -1 ) < Volume
// AND MA(Volume,15) > MA(Volume,30);
// RSI() < 50

Filter = Ref( LLV( Close, 250 ), -1 ) > Close
//AND Close > (Ref(Close,-1)+(Ref(Close,-1)*5/100))
AND Close > 25
AND RSI() < 50
//AND Volume > 3*Ref(Volume,-1)
AND MA(Volume,20) > 100000
AND OI > (Volume*60/100)
AND OI != Volume
;

AddColumn( Ref(Close,-1), "PrevClose" );
AddColumn( Close, "Close " );
AddColumn( (Close-Ref(Close,-1))/Ref(Close,-1)*100, "%UP " );
//AddColumn( High, "High " );
//AddColumn( Low, "Low " );
AddColumn( Ref(Volume,-1), "PrevVol " );
AddColumn( Volume, "Volume " );
AddColumn( OI, "OI " );
Thankyou very much...

Subrata Bera.
 

chintan786

Well-Known Member
#20
hi friends i am new to Amibroker and don't know anything abt AFL.

I just copied the AFL written over and pasted in Amibroker Formula Editer.

Now wht to do next i don't know.

If someone take pain to tell me how to apply them to the Script(s) then i am very thank ful to u ppl

I just want to know few steps tht wht buttons are need to click to apply this codes.

I know it is very small work for u ppl but it is great help for me

thanks in advance
 

Similar threads