|
Hello,
I wanted to write a AFL which shall
give me the Monthly returns of any scrip for which I explore.
I tried out the
following
// Explore to get Monthly
Returns;
A = ValueWhen(Day()==31 AND
Month()==8 ,C);
B = ValueWhen(Day()==30 AND Month()==9 ,C); D = ( (100 * B) / A ) -
100;
Filter=1;
AddColumn(A," A
");
AddColumn(B," B "); AddColumn(D," D "); But I am finding some
problems.
1. For Value of B, it takes previous
years data. This can be overcome by maybe using the Year() function, but the
Explore I am trying to write is for running over multiple years and hence cant
use the same.
2. If 30 or 31st is a Holiday, I can
get incorrect data. How do I overcome that.
If anyone has a simple method, I
would be very much interested.
Thanks in Advance
Regards
Prashanth
__._,_.___
Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- [amibroker] Explore for getting Monthly Returns Prashanth
