MACD cross over signal for Amibroker (AFL)
lenhhoxungs over 12 years ago Amibroker (AFL)
This is a simple code to filter stocks that have MACD cross its signal line.
Cos MACD is a slow indicator, i often use this to search for weekly signal that
give a mid and long-term trend.
Note: I just start to use Amibroker and this simple code is given to me by my friend.
Indicator / Formula
Copy & Paste Friendly
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
a=Cross(m1,s1);
Filter = a>0;
AddColumn(C,"Close",1.2);
AddColumn(V,"Volume",1.2);0 comments
Leave Comment
Please login here to leave a comment.