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

Re: [amibroker] Event Date



PureBytes Links

Trading Reference Links

Hi,

> Questions to help me with AFL
> 
> 1. What is the purpose of the alltimehighbar line? I don't see the variable 
> referenced anywhere.
It is not used in the formula but given as an example.

> 3. Is the alltimehighbar variable returning the bar number of the highest 
> high? Such as #67 out of 300 data periods?
Exactly. 

> 2. Why is lastvalue(highest(high)) used instead of just highest(high)?
The trick is that highest(high) gives signals on EVERY new high throughout
all the bars loaded. 
For example highestbars( high ) == 0 statement gives TRUE every time a new
high is reached.

LastValue( highest( high ) ) gives only ONE all-time high.

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


----- Original Message ----- 
From: "Tom Presley" <tpresley@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, March 11, 2001 5:13 PM
Subject: Re: [amibroker] Event Date


> >Use the following formula to find the all-time highest and display its 
> >value and date:
> >
> >alltimehigh = LastValue( Highest( high ) );
> >alltimehighbar = ValueWhen( high == alltimehigh, Cum(1) );
> >
> >alltimeyear = ValueWhen( high == alltimehigh, Year() );
> >alltimemonth = ValueWhen( high == alltimehigh, Month() );
> >alltimeday = ValueWhen( high == alltimehigh, Day() );
> >
> >"All time highest was " + WriteVal( alltimehigh );
> >"on the " + WriteVal( alltimeyear, 1 ) + "." + WriteVal( alltimemonth, 1 ) 
> >+ "." + WriteVal( alltimeday, 1 );
> >
> >/* Draw also a vuy arrow on highest day */
> >buy = high == alltimehigh ;
> >sell = 0;
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
>