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

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



PureBytes Links

Trading Reference Links

Hello,

Yes,
tr = TroughBars( low, 2, 1 ) == 0;

gives "1" on the bar when trough occurred and "0" otherwise.

Then:
barsbetweentroughs = ValueWhen( tr, barno, 1 ) - ValueWhen( tr, barno, 2 );

calculates the difference between barnumber (cum(1) for two most
recent points where tr is "1".

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



----- Original Message ----- 

From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, August 21, 2001 8:48 PM
Subject: [amibroker] Re: bars between High to high or Low to Low


> Tomasz, do you mean 
> tr = TroughBars( low, 2, 1 ) == 0;
> pk = PeakBars( high, 2, 1 ) == 0;
> ?
> D.T.
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > 
> > 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@xxxx>
> > 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/ 
> > > 
> > > 
> > >
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>