Hi Anant,
Thanks for thd Afl. The text file is missing the 3rd line BarNum = 0;
When you add that the Ln 15 Col 10 gives error. subscript out of range.
Could you please correct it and post the afl text file
Thanks & regards
ken
Thanks for thd Afl. The text file is missing the 3rd line BarNum = 0;
When you add that the Ln 15 Col 10 gives error. subscript out of range.
Could you please correct it and post the afl text file
Thanks & regards
ken
Thank you for the feed back.
I have checked the AFL and is working properly. I can understand why you are getting the errors. I am explaning below and the correction required.
The line BarNum = 0;
It does not make any difference even if it is absent. It is added as a safety measure to initialise the value. But, yes, it can give error in other circumstances. I think you got the error because of the 'other reasons'. However, I have modified the AFL and replaced the old attachment with the newer version. You can download and use it.
Now, coming to the 'other reasons' which gave you the error:
There are three posibilities:
1) You have applied the AFL to a set of stocks other than the list given by Savantji on 28-5-09 or 02-06-09.
2) One of the stocks in your list (on which you have tested the AFL) has no data (no quotes) for the day of buying.
3) One or more of the stocks in your test list have less than 3 quotes. If this is true Amibroker itself displays the error message when you try to see the chart for such stocks.
Corrective measures:
If reason 1) or 2) or both are correct in your case then the modified AFL which I have now posted (in the original message 3397) will solve the problem.
If reason 3) is the case then you have to get rid of the symbols which have less than 3 quotes. You can find such symbols using the following 4-line AFL
Code:
[COLOR="Blue"]
Filter = BarCount < 3;
SetOption("NoDefaultColumns", True);
AddTextColumn(Name(), "Symbol");
AddColumn(BarCount, "Total Bars", 1.0);[/COLOR]
If you have any queries, suggestions or error reports please notify without hesitation and without delay.
Regards
-Anant
Last edited: