PureBytes Links
Trading Reference Links
|
Owen,
ValueWhen(Condition, Ref(HHV(H,4)) is just OK, it will hold the
requested value untill the next COND occurrence.
DT
--- In amibroker@xxxxxxxxxxxxxxx, "Owen Davies" <owen5819@xxxx> wrote:
> > that would give me the highest close of the last 4 days. I am
looking
> > for the 4 days prior to my condition
>
> ValueWhen(Condition, Ref(HHV(H,4),-1), 1) ought to work for a one-
shot
> condition. If your condition is repeated frequently, you will need
to do
> something like Sig=IIf(condition,1,-1);
> ValueWhen(Cross(Sig,0),HHV(H,4),-1),1);. No doubt there is some
way to use
> Flip() as well, but I haven't needed that function yet.
>
> Owen Davies
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|