[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: AFL question



PureBytes Links

Trading Reference Links

Hi,
It depends how many days you want to hold this info.
The day of COND, your request R is
COND=Cross(StochD(),70);
H1=ValueWhen(COND,Ref(HHV(H,4),-1));
R=COND*H1;
In the case you want to remember this value untill the next COND 
occurrence, then simply use
COND=Cross(StochD(),70);
H1=ValueWhen(COND,Ref(HHV(H,4),-1));
R=H1;
Valuewhen is not the only way.
You will have the same result with
COND=Cross(StochD(),70);
H1=AMA(Ref(HHV(H,4),-1),COND);
R=COND*H1

and, respectively

COND=Cross(StochD(),70);
H1=AMA(Ref(HHV(H,4),-1),COND);
R=H1;

In general, ValueWhen(COND,Array) is equivalent to AMA(Array,COND)
DT
--- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> Condh=mycondition;
> how can I get the highest close of the 4 days preceeding my 
condition?
> 
> TIA


------------------------ 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/