Angular Movements for Amibroker (AFL)
ramshirsath over 16 years ago Amibroker (AFL)
Angle plotted with buy sell arrow.
Indicator / Formula
Copy & Paste Friendly
_SECTION_BEGIN("Asish_Indicator_01");
a = Param("Angle",30,15,45,1);
pd = Param("Period",5,4,6,1);
P = ParamField("Price field",3);
a= (22/7)*(a/180);
Num = 0;
Den = 0;
for(i=1; i<=pd; i++)
{
if(pd%2==0 AND i > pd/2) X = sin((i-1)*a);
else X = sin(i*a);
Num = Num + X*Ref(P,1-i);
Den = Den + X;
}
if (den!=0) j1 = Num / Den;
Plot(j1,"j1",IIf(j1 > Ref(j1,-1),colorGreen,colorRed),styleThick);
Buy = Close > j1;
Sell = Close < j1;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);
PlotShapes( shapeHollowUpArrow* Buy , colorBlue ,0);
PlotShapes( shapeHollowDownArrow* Sell, colorYellow ,0);
//Plot(0,"",colorDarkBlue,styleLine);
Filter = Buy OR Sell;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);
AddTextColumn(FullName(),"Name");
AddColumn( Buy, "BUY" );
AddColumn( Sell, "SELL" );
_SECTION_END();2 comments
Leave Comment
Please login here to leave a comment.
I use this indicator with almost no loss. Unique indicator provided very good result if it can be use properly. Almost “top” and “bottom” can be find out. I am giving 5 star. Thanks.
Hi @subrata chakraborty54,
Found this useful but unable to use it to its full potential. I will really appreciate if you can suggest few ways to optimise this indicator.