[amibroker] nested FOR loop question

 

Can I use a nested FOR loop or .. to perform
an operation such as HHV on a subset of records
from a larger set of records where the subset is
chosen based on meeting a certain condition?

EXAMPLE:
I want to do the HHV of column 3 on 4 records
within the last 7 records where column 4 value
is 1.  Column 2 is a flag for me.  The number
of records to consider (4) is set by user.

I need the loop to keep reading and calculating
the values until 4 records have been found that
meet the condition and then perform the operation
such as HHV.

I seem unable to figure out how to write this code.
Any help would be Much appreciated!!

col 1 col 2 col 3   col 4

date1 close1 value1 1
date2 close2 value2 0
date3 close3 value3 0
date4 close4 value4 1
date5 close5 value5 1
date6 close6 value6 0
date7 close7 value  1

I want the HHV of records from date1, date4,
date5 and date7.



__._,_.___

Posted by: karl.bergerson@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? The Yahoo Mail app is fast, beautiful and intuitive. Try it today!

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon