PureBytes Links
Trading Reference Links
|
Hi Graham,
For some reason that didn't seem to give me the result I was looking
for and the way I explained what I was trying to do might not have
been clear, but it got me thinking a little differently about what I
wanted to actually accomplish. This code seems to do it:
Buy = IIf ( C > Ref ( HHV ( C, 20 ), -1 ) AND Ref ( HHV ( C, 20 ), -1
) < Ref ( HHV ( C, 20 ), -20 ), 1, 0 );
This will now be self explanatory to you I'm sure so I won't
elaborate. To echo a post to you in the last couple of days, thanks a
lot for all the help you give people. I always read what you have to
say to anybody.
Thanks,
Bret
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> maybe something like this
>
> HC = C > Ref ( HHV ( C, 20 ), -1 ); // could also be written C ==
HHV ( C, 21 )
> PHC = ref(sum(HC,20),-1)==0; // needs the ref-1 to exclude current bar
>
> On 6/19/05, Quad Rate Serial Abby <quad_pumped_abby@xxxx> wrote:
> > Hi,
> >
> > I'm having a brain cramp on this. I have code to find a close that is
> > the highest in 20 days, ala:
> >
> > C > Ref ( HHV ( C, 20 ), -1 )
> >
> > How do I now set a condition that the 20 days prior to today did not
> > have any close that resulted in the condition above over that period?
> > I thought this was trivial, but I guess not for me. Any help would be
> > appreciated. Thanks,
> >
> > Bret
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|