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

Re: all time high



PureBytes Links

Trading Reference Links

David,
If you want that as a label on a graph,
write
TITLE="All time highest ...
and replace ; with + at the end of this line, i.e.

TITLE="All time highest was " + WriteVal( alltimehigh )+
> "on the " + WriteVal( alltimeyear, 1 ) + "." + WriteVal( 
alltimemonth, 1 ) + "." + WriteVal( alltimeday, 1 );

D. Tsokakis

--- In amibroker@xxxx, "David Holzgrefe" <dtholz@xxxx> wrote:
> Hi all 
> 
> I was trying to find a way to caculate the all time highest from a 
date eg
> 
> 12/01/00 on this date which stock where trading at there all time 
high ?
> 12/06/99 on this date which stock where trading at there all time 
high ?
> 
> have tried TJ's all time high formula but i can't get it to specify 
a date 
> 
> change the date in the range field only shows the at of the 
accourance 
> what im after is which stock at this date where on a all time high ?
> 
> 
> Thanks David 
> 
> 
> 
> /* all-time highest
> 
> 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 and Volume > 1000 AND strlen( name() ) == 
3;;
> sell = 0;