Slideshow

Cheap Web Hosting Sites

Social Icons

'

Saturday, May 7, 2011

Simple but Useful AFL

While analysing a price chart, we often see an intriguing price action and a simple question pops up in our mind-"How many trading days back this happened?"
One silly way to find this is manually counting the bars, too boring and too much time consuming!
Just chill, with the help of the Amibroker, you can find this in fractions of a second.

For that we use a simple AFL. One just to needs to click on the bar, where that price action has taken place and the rest is done by the Amibroker.
On 18 May,2009 there was  gap-up opening in almost every large cap stocks, If I click on the bar of 18 May, AFL tell us how many days back, it happened.





For that use the following AFL-



//iforp.co.nr

//use Daily Time Frame

TimeFrameSet(inDaily);

bi=BarIndex();

a=SelectedValue(bi);

b=LastValue(bi);

d=b-a;

GfxSetTextColor(colorBlue);

GfxTextOut(""+d+" trading days back ",400,200);

TimeFrameRestore();

0 Comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...