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

Re: [amibroker] bars between High to high or Low to Low



PureBytes Links

Trading Reference Links

Hello,

To get the number of bars between the most recent peaks/troughs
use the following formula:

tr = TroughBars( close, 2, 1 ) == 0;
pk = PeakBars( close, 2, 1 ) == 0;

barno = cum(1);

barsbetweentroughs = ValueWhen( tr, barno, 1 ) - ValueWhen( tr, barno, 2 );
barsbetweenpeaks = ValueWhen( pk, barno, 1 ) - ValueWhen( pk, barno, 2 );


Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: "kailash pareek" <johnnypareek@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, August 21, 2001 4:59 PM
Subject: [amibroker] bars between High to high or Low to Low


> Hi there,
> 
> Subject explains itself any coding help ?
> 
> johnny
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>