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

[amibroker] Best data vendor for realtime scans: yahoo....?



PureBytes Links

Trading Reference Links

You can write a function for that,


function HighestBetween(expression,array,n)
//Returns the highest ARRAY value between the Nth most recent
//occurrence of True EXPRESSION AND the one prior to that.
 {
 e=expression;a=array;
 Hb=IIf(n>0,ValueWhen(e,Ref(HighestSince(e,a,1),-1),
    Min(LastValue(Cum(e)),n)),HighestSince(e,a));
 return LastValue(Hb);
 }


//example of use
Cond=Cross(MACD(),0);
Occ=Param("occ",0,0,8);
x=HighestBetween(Cond,H,Occ);

GraphXSpace=4;
Plot(C,"",colorDefault,styleBar);
Plot(Cond,"",colorRose,styleHistogram|styleOwnScale|styleNoLabel);
Plot(x,"",colorRed,styleLine);

Regards,
Johan


--- In amibroker@xxxxxxxxxxxxxxx, "rakeshsahgal" <rakeshsahgal@xxxx> 
wrote:
> Group,
> 
> The manual states that this function is used to find the highest 
value
> of an array since the nth occurence of a condition e.g. 
highestsince(
> Cross( macd(), 0 ), Close, 1 ) . Now if I want to find the highest
> close  subequent to the occurence where n=2 and prior to the 
occurence
> where n=1 i.e. the interveining highest value, how do I got about
> that?
> 
> 
> Thanks in advance for any help,
> 
> Regards
> 
> 
> 
> Rakesh



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/