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

[amibroker] help loop programming



PureBytes Links

Trading Reference Links

Hi all,

I'm trying to program the following idea in a loop, but could use some help.

Right now i have the following code to measure the high of a specific time range. (4 hour timerange)

H1 = ValueWhen(timerange, TimeFrameGetPrice( "H", inHourly, 0, expandFirst)); 
H2 = ValueWhen(timerange, TimeFrameGetPrice( "H", inHourly, -1, expandFirst)); 
H3 = ValueWhen(timerange, TimeFrameGetPrice( "H", inHourly, -2, expandFirst)); 
H4 = ValueWhen(timerange, TimeFrameGetPrice( "H", inHourly, -3, expandFirst));
Max1 = Max(H1,H2);
Max2 = Max(H3,H4);
High = Max(Max1,Max2);

As you can see the High is measured every hour.
But i want to measure it every minute.
The code for that would be very long if i continued programming in this way.
Thats why i think it should be done in  a loop, but i have not enough programming skills to do that.
Can anyone help me with it?

regards





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

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