AFL for Exploring Trading Days in Year

docvijay4u

Well-Known Member
#1
Hi,

I want afl which can explore trading days in year. I need it because after deleting recently not traded scrips, merging, correcting for bonus and split there are still anomalies in chart. Just for example for ADVANIHOTR there is gap from 2000 to 2007.

I found afl for same purpose on ami site but it is for plotting not exploring. I can also find it with database purify option in ami, but both option are too much time consuming.

It could be more simple if I can explore results as follow:

Code:
ADVANIHOTR:   2001   2002   2003   2004   2005   2006   2007
Trading Days:  244    88     0      0       0       0     98
or something similar to it.

Is it possible?

Thanks.
 
Last edited:

trash

Well-Known Member
#2
Code:
Cond = Year() != Ref(Year(), -1);
P = BarsSince( Cond ) + 1;

// FILTER
Filter = Ref( Cond, 1 ) || Status("lastbarinrange");

// DISPLAY COLUMNS
SetOption( "NoDefaultColumns", True );
AddTextColumn( Name(), "Symbol", 1.0, colorWhite, colorDarkGrey, 70 );
AddColumn( DateTime(), "Date/Time", formatDateTime, colorWhite, colorDarkGrey, 120 );
AddColumn( p, "Days", 1.0, colorBlack, colorGrey50, 70 );
 

docvijay4u

Well-Known Member
#3
Hi,

Afl is very close to my idea. It will save lot of time and truly useful. :thumb:

It would be great if you explain little bit about first 3 line in afl.

Thank You:)
 
Last edited:

sikandar

Active Member
#4
Code:
Cond = Year() != Ref(Year(), -1);
P = BarsSince( Cond ) + 1;

// FILTER
Filter = Ref( Cond, 1 ) || Status("lastbarinrange");

// DISPLAY COLUMNS
SetOption( "NoDefaultColumns", True );
AddTextColumn( Name(), "Symbol", 1.0, colorWhite, colorDarkGrey, 70 );
AddColumn( DateTime(), "Date/Time", formatDateTime, colorWhite, colorDarkGrey, 120 );
AddColumn( p, "Days", 1.0, colorBlack, colorGrey50, 70 );
trash
noob q
what is interpretation of Year() ! with respect to the condition
Cond = Year() != Ref(Year(), -1);

:)
 

Similar threads