Discussion on kolkata meet signal

SGM

Active Member
#41
are u sure that the afl is correct.the code for metastock gives a smooth curve but the afl gives a highly choppy curve.
moreover the line's for the kolkata meet indicator & the one in which the code is given doesnt match
Hello vikram

You may be right on the count that the conversion is faluty, I do not use metastock so can't verify, maybe someone else can do that for you. The original code that asishda send me for conversion is also uploaded here.

The forum has great threads for learning afl coding, or just do a search for all posts of bvpraveen.

Regards
Sanjay
 
Last edited:

kkseal

Well-Known Member
#42
Asishda had posted somewhere about removing noise from sine waves & here you have a Sine weighted MA.

But what if one wants to use a length/period > 5?

To accommodate any length i think a for-loop would be required.

Regards,
Kalyan.
 
U

uasish

Guest
#43
are u sure that the afl is correct.the code for metastock gives a smooth curve but the afl gives a highly choppy curve.
moreover the line's for the kolkata meet indicator & the one in which the code is given doesnt match
The one sent to Sanjay is same,but now i find that i used Low instead of Close (which i sent to Sanjay)in Kolkata Meet.
 
U

uasish

Guest
#44
wosh, it took me more than double the time to post compared to code and backtest. Anyway, heres the last one with back test report of Nifty Futures

NF, EoD, 01 Jan 2008 - April 17 2008

NF, Hourly, 01 Jan 2008 - April 17 2008

Please do your own test before drawing any conclusions. The code is available, so shouldn't be a problem to convert into anything.

Regards
Sanjay
So optimization gives a better result & in Choopy Session performed better ,however overall the performance abysmal bad.
 

SGM

Active Member
#46
The one sent to Sanjay is same,but now i find that i used Low instead of Close (which i sent to Sanjay)in Kolkata Meet.
P = ParamField("Price field",-1); Replacing P for C would make the input selectable can use H, L, O, C or average etc.

The following code can be used on seperate pane maybe below price to get up/down signals.

Code:
_SECTION_BEGIN("Asish_Indicator_01");

a  = Param("Len",30,15,45,1);
P = ParamField("Price field",-1);

Num = sin(1*a) * P + sin(2*a) * Ref(P,-1) + sin(3*a) * Ref(P,-2) + sin(4*a) * Ref(P,-3) + sin(5*a) * Ref(P,-4);

Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a);

j1 = Num / Den;

Plot(IIf(j1 > Ref(j1,-1),10,-10),"j1",IIf(j1 > Ref(j1,-1),colorBlueGrey,colorLime), styleThick|styleOwnScale,-12,12);

_SECTION_END();
rgds
 

Attachments

biyasc

Well-Known Member
#47
sorry to hear it from u mr biyas. u were present so u cud hav asked for an explanation from the man himself.
vvvv, you misunderstood me. i appreciate the logic of kkseal for not using the indicator. there is no offense about asisda's indicator.
 
Last edited:

kkseal

Well-Known Member
#48
The ball, as they say, is in your court. :)

I am sure you would post here, whatever you come up with.

rgds
Why bother when the results are so bad? :) (Not many will be interested anyway)

Nonetheless, i'll try to come up with the code post mkt.

The weighting will be different though for odd & even periods*. More on that later.

Regards,
Kalyan.

* like say if it's 1 2 3 2 1 for 5 pds, it'll be 1 2 3 3 2 1 for 6 pds
 

kkseal

Well-Known Member
#49
Ok, first things first

In Sanjay's code (AFL not MS code) insert

a = (22/7)*(a/180);

after 1st line.

This'll solve a basic problem (& regenerate interest in the indi :)).

Regards,
Kalyan.
 
Last edited:

kkseal

Well-Known Member
#50
This is for entry of ODD periods (from 3 to 13)

HTML:
_SECTION_BEGIN("Asish_Indicator_01");

a  = Param("Angle",30,15,45,1);
pd = Param("Period",5,3,13,2);
P = ParamField("Price field",3);

a= (22/7)*(a/180);
Num = 0;
Den = 0;

for(i=1; i<=pd; i++)
{
    Num = Num + sin(i*a)*Ref(P,1-i);
    Den = Den + sin(i*a);
}

if (den!=0)  j1 = Num / Den;

Plot(j1,"j1",IIf(j1 > Ref(j1,-1),colorBlueGrey,colorLime),styleThick);

_SECTION_END();
Regards,
Kalyan.
 
Last edited:

Similar threads