PureBytes Links
Trading Reference Links
|
What about something like this:
condition = timenum() == 09300;
interesting = IIF(condition, High - Low, 0);
avgInteresting = Sum(interesting, 20) / Sum(interesting != 0, 20);
Plot(1, "Cond.", IIF(condition, colorGreen, colorRed), styleArea | styleOwnScale | styleNoLabel);
Plot(interesting, "Interesting", colorGreen, styleDots | styleNoLine);
Plot(avgInteresting, "Avg. Interesting", colorBlue);
Mike
--- In amibroker@xxxxxxxxxxxxxxx, jim fenster <normanjade@xxx> wrote:
>
> 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 <yg2.pt@xxx>
> To: amibroker@xxxxxxxxxxxxxxx
> 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 amibroker@xxxxxxxxx ps.com, Herman <psytek@> 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
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>
>
>
>
> __________________________________________________________________
> Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
>
------------------------------------
**** 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:
amibroker-digest@xxxxxxxxxxxxxxx
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/
|