AFL Exploration problems

murthyavr

Well-Known Member
#1
I have been experiencing a problem with AFL exploration.

Let's suppose I use this simple AFL to get the moving average of the recent 5 bars, on a 5-min chart.

_SECTION_BEGIN("Test");
ee=MA(C,5);
Plot(ee,"MA",colorRed,styleLine);
Filter=1;
AddColumn(ee,"MA(5)",1.2);
_SECTION_END();


Today, the closing prices of ABIRLANUVO for the last five 5-min candles were
884.30, 882.55, 877.00, 876.20 and 880.00. The average comes to 880.01
and yes - the chart in Amibroker also shows the moving average value as 880.01.

However, when I run the exploration for the program mentioned above, the exploration
window gives the Moving Average value for ABIRLANUVO as 887.24, which is obviously wrong.

I think I have not fully understood how Amibroker is interpreting the above AFL in particular
and various other AFLs in general, because I keep getting such different values for most of the AFLs,
specially when computed values are explored.

Can someone please guide me on this?

Thank you.
 
Last edited:

murthyavr

Well-Known Member
#3
Thanks for your reply, novicetraders.

Yes, the problem is fixed now in the sense that the MA shown in the exploration window
and the chart are the same.

But, in the above case of ABIRLANUVO, I get the MA of last five bars for today as
879.87, whereas it should be 880.01. But that's OK as long as the result shown in the
chart and the exploration window are the same.

With the above code, the exploration window now shows the MA for each 5-min interval,
which means I get about 75 averages for the same scrip for the day. How should I change
the code/settings to get the MA of the last/latest 5 bars only?

Thanks for your help..
 
Last edited:
#4
i donot know any programme or strategies in stock market but i lost huge amounts in lakhs can any body suggest best programming or strategies please........
 

sansarva

Active Member
#5
i donot know any programme or strategies in stock market but i lost huge amounts in lakhs can any body suggest best programming or strategies please........
The only way to gain is to learn a statergy, money mangement, and discipline.

The first ofcourse is statergy. That statergy you have to create yourself, how? by learning , now what to learn depends on where you play in stock market, if it is trading, then what type? AFL, programming comes much later. the learning may take a long time, some times years.

For learning resources are availablie this forum.

Hope this somewhat answers