Hello Chintan,
Read through the AFL code and see how various inputs like B1 up and B1dn and then TOTAL is defined or initialised by the author. For example B1 is initialised as follows by the author
B1 = NOT upswing AND zz <= ftr + PriceZone AND zz >= ftr;
in the above line of code he has seperately initialised ZZ, ftr , pricezone etc. For example ZZ=zz = Zig( Close, Change ); Here Zig is a function in AFL synthax.
Another example is
// find last and previous Peak/Trough values
// and bars where they occur
pk = Peak( Close, Change );
tr = Trough( Close, Change );
pkbars = PeakBars( Close, Change );
trbars = TroughBars( Close, Change );
Here the explanation of what author wants through his code is masked out by //. here he wants to find last and previous Peak/Trough values
and bars where they occur. Peak and tough bars are also AFL functions.
Similarly he has defined or initialised all other variables in his code.Total is nothing but the cumulative total of all up and down counts.
This is the reason why i mentioned earlier you use this code to learn or understand how to code in AFL. You also need to study through the helpfile in Amibroker. Often i find majority of the users do not know the real functioning of the codes they use. It is just depending on buy or sell arrows shown by the code.
you must take pain to study each and every AFL code you come across by taking a printout and analysing in detail what it does.
In this forum there are some persons with good AFL knowledge like Praveen , Karthik and sanjay to name a few.You may also contact them to learn more.
Regards
Saji
Read through the AFL code and see how various inputs like B1 up and B1dn and then TOTAL is defined or initialised by the author. For example B1 is initialised as follows by the author
B1 = NOT upswing AND zz <= ftr + PriceZone AND zz >= ftr;
in the above line of code he has seperately initialised ZZ, ftr , pricezone etc. For example ZZ=zz = Zig( Close, Change ); Here Zig is a function in AFL synthax.
Another example is
// find last and previous Peak/Trough values
// and bars where they occur
pk = Peak( Close, Change );
tr = Trough( Close, Change );
pkbars = PeakBars( Close, Change );
trbars = TroughBars( Close, Change );
Here the explanation of what author wants through his code is masked out by //. here he wants to find last and previous Peak/Trough values
and bars where they occur. Peak and tough bars are also AFL functions.
Similarly he has defined or initialised all other variables in his code.Total is nothing but the cumulative total of all up and down counts.
This is the reason why i mentioned earlier you use this code to learn or understand how to code in AFL. You also need to study through the helpfile in Amibroker. Often i find majority of the users do not know the real functioning of the codes they use. It is just depending on buy or sell arrows shown by the code.
you must take pain to study each and every AFL code you come across by taking a printout and analysing in detail what it does.
In this forum there are some persons with good AFL knowledge like Praveen , Karthik and sanjay to name a few.You may also contact them to learn more.
Regards
Saji
thank u saji thank u very very much for replying.