[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Newbie Array / Looping Question



PureBytes Links

Trading Reference Links

Hi all,

I'm after a general form for doing a particular type of algorithm 
in AFL - and I'm happy to admit that I might be going about it 
the totally wrong way...

I am attempting to extract an evolving "profile" of a stock over 
time.

Using "median" as an example, lets say I want calculate the median
percentage price change for the life of the stock. To give an 
example:
     
    The 1st trading day - do nothing.
    The 2nd trading day - calc median for 2 days
    The 3rd trading day - calc median for 3 days
    Last traded day     - calc median for n days.

For simple functions, I have used a construct similar to;
    for ( i=0; i < BarCount; i++ ){
       myArray[ i ] = simpleFunc( i );
       .....
    }

However, in this case, I would have to write a new median function,
and this is irritating, since there is a perfectly good one 
taunting me from the users manual! That's why I suspect that I 
might be doing something in the wrong way.

Any help or pointers would be much appreciated. A pointer to 
a message in the user group would be fine too! ( Yes I am still
trawling through the email group as I write this....)

TIA

Robert Z



------------------------------------

**** 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/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/