"Kolkata Meet Band Indicator" AFL

Joined
Mar 10, 2006
Messages
98
Likes
67
#1
I have seen the "Kolkata Meet Band Indicator" mentioned in several posts.
But i could not find the AFL for the same.
I shall be grateful if the AFL for the same can be posted or the link where the same can be found

Thanks
 
Joined
Nov 17, 2008
Messages
196
Likes
110
Location
Hyderabad
#2
Here it is :

function KolIndicator(Price_Field, Angle)
{
a = (22/7)*(Angle/180);
Num = sin(1*a) * Price_Field + sin(2*a) * Ref(Price_Field,-1) + sin(3*a) * Ref(Price_Field,-2) + sin(4*a) * Ref(Price_Field,-3) + sin(5*a) * Ref(Price_Field,-4);
Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a);
kolkata = Num / Den;
return kolkata;
}

Angle = Param("ANGLE", 30, 0, 360, 1);
Field = ParamField("Price Field", 3);

Plot(KolIndicator(Field, Angle), "Kol Indicator", ParamColor("Color", colorLightGrey));
 
Joined
Mar 10, 2006
Messages
98
Likes
67
#4
Thanks for posting the AFL

However, it is showing a syntax error on "return Kolkata;" line (line6)

Please correct the same and post again for which i shall be obliged

Thanks
 
Joined
Nov 17, 2008
Messages
196
Likes
110
Location
Hyderabad
#5
There is no error in the code. I have tried it thousands of time.
Please copy and paste it correctly!!!

----TIZ---------

Thanks for posting the AFL

However, it is showing a syntax error on "return Kolkata;" line (line6)

Please correct the same and post again for which i shall be obliged

Thanks
 

sikandar

Active Member
Joined
Mar 20, 2007
Messages
587
Likes
228
Location
Tirunelveli
#6
Here it is :

function KolIndicator(Price_Field, Angle)
{
a = (22/7)*(Angle/180);
Num = sin(1*a) * Price_Field + sin(2*a) * Ref(Price_Field,-1) + sin(3*a) * Ref(Price_Field,-2) + sin(4*a) * Ref(Price_Field,-3) + sin(5*a) * Ref(Price_Field,-4);
Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a);
kolkata = Num / Den;
return kolkata;
}

Angle = Param("ANGLE", 30, 0, 360, 1);
Field = ParamField("Price Field", 3);

Plot(KolIndicator(Field, Angle), "Kol Indicator", ParamColor("Color", colorLightGrey));
Hi TraderInTheZONE
Any rules to trade with this indicator?
 

Similar threads

Broker Special Offers