Hi,
I need help in writing an AFL exploration code for finding out the scrips whose Bollinger Band width is minimum in the last 6 months. Right now I am doing this manually with the help of Excel. I am using this code:
D = Sum(Close, 10)/10;
E = D + StDev(Close, 10);
F = D - StDev(Close, 10);
G = E - F;
Filter = 1;
AddColumn(Close, "Price");
AddColumn(G, "G");
In the AA window, in the Range section, I enter "from" and "to" dates and copy the output to Excel, click on column titled "G", click on Sort Ascending, choose "Expand the selection" and sort. Then I click on "Ticker" column, click on Sort Ascending, choose "Expand the selection" and again sort. Then I use "Find" function of Excel to see whether the "To" date I entered in the Range section appears at the top for that scrip or not.
Can anybody please help me to write the code to display the list of scrips in AA window or just flag them with a color?
I need help in writing an AFL exploration code for finding out the scrips whose Bollinger Band width is minimum in the last 6 months. Right now I am doing this manually with the help of Excel. I am using this code:
D = Sum(Close, 10)/10;
E = D + StDev(Close, 10);
F = D - StDev(Close, 10);
G = E - F;
Filter = 1;
AddColumn(Close, "Price");
AddColumn(G, "G");
In the AA window, in the Range section, I enter "from" and "to" dates and copy the output to Excel, click on column titled "G", click on Sort Ascending, choose "Expand the selection" and sort. Then I click on "Ticker" column, click on Sort Ascending, choose "Expand the selection" and again sort. Then I use "Find" function of Excel to see whether the "To" date I entered in the Range section appears at the top for that scrip or not.
Can anybody please help me to write the code to display the list of scrips in AA window or just flag them with a color?
******
i thought timeframeset would be usefull so asked u about the TF u used but it seems it is not working....
trying to find way with my limited knowledge.
*****
i tried but it looks out of my grasp.
i think it need some veteran.
hope they look in to it
the code i reached up to
****
pr=Param("lookback",150,0,200,1);
D = Sum(Close, 10)/10;
E = D + StDev(Close, 10);
F = D - StDev(Close, 10);
G = E - F;
Hh=HHV(g,pr);
Ll=LLV(g,pr);
Plot(g,"BD",colorBlack);
t=hh==Ref(Hh,-1);
b=ll==Ref(Ll,-1);
top=ExRem(t,b);
bot=ExRem(b,t);
PlotShapes(top*shapeUpArrow, colorGreen, 0, g, -28);
PlotShapes(bot*shapeDownArrow, colorRed, 0, g, -28);
Filter = 1;
AddColumn(Close, "Price");
AddColumn(G, "G");
Last edited: