cond=ma(valuewhen(timenum()==09300,h-l),20);
----- Original Message ----- From: jim fenster To: [email protected] Sent: Tuesday, December 15, 2009 6:44 PM Subject: Re: [amibroker] Re: How do you check for a condition that occurred over X days? is there a way to check on another statistic? Like the average? like condition=timenum()==09300; if condition then h-l; then finding the average of the last 20 bars (h-l) that was 093000? J ------------------------------------------------------------------------------ From: peter843 <[email protected]> To: [email protected] Sent: Sat, December 12, 2009 11:16:56 AM Subject: [amibroker] Re: How do you check for a condition that occurred over X days? Thanks. That worked. That one little statement taught me a lot about how AFL works. --- In amibro...@yahoogrou ps.com, Herman <psy...@...> wrote: > > sum( Condition, NumberOfDays) ? > > herman > > > peter843 wrote: > > I want to check for conditions that occur over a number of consecutive days and specify the number of days with a variable. I assume I can do this with a FOR loop. Is there a simpler way? > > > > > > > > ------------ --------- --------- ------ > > > > **** 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.amibroke r.com/feedback/ > > (submissions sent via other channels won't be considered) > > > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > > http://www.amibroke r.com/devlog/ > > > > Yahoo! Groups Links > > > > > > > > > > > > > ------------------------------------------------------------------------------ Looking for the perfect gift? Give the gift of Flickr!
