Thanks Ara, I tried it like this:
y[1]=1103; y[2]=1107; y[3]= 1095; y[4]= 1100; x = ValueWhen(HHVBars(y,4)==0,BarIndex()); but get 16,758 rather than 2 - is there another way to write it? Looks like a simple problem! Kevin --- In [email protected], "Ara Kaloustian" <a...@...> wrote: > > use valuewhen function and return the barindex() value > > ----- Original Message ----- > From: "kevinoversby" <kevinover...@...> > To: <[email protected]> > Sent: Monday, December 21, 2009 12:31 PM > Subject: [amibroker] How to extract position in (non time based) array > > > >I can't find a function in the reference to do this. > > > > For example, I have an array of the last 4 highs (from Zig function): > > > > {1103 1107 1095 1100} > > > > I want to return the index of the highest value (i.e 2). > > > > Is there a way to do this? > > > > > > Thanks > > > > Kevin > > > > > > > > > > > > ------------------------------------ > > > > **** 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 > > > > > > > > >
