try this to find the lowest close for entire history Lowest_Close = lastvalue( Lowest(Close) ); L_date =lastvalue( ValueWhen( Lowestbars(Close)==0, DateTime(), 1) ); Lowest_date = NumToStr( L_date, formatDateTime); Title = Name() + ": Total bars " + BarCount + " Low = " + Lowest_Close + " on " + Lowest_date;
-- Cheers Graham Kav AFL Writing Service http://www.aflwriting.com 2008/9/16 imorf69 <[EMAIL PROTECTED]>: > Hi all, > I have been trying *unsuccessfully* to generate the all time low Close > and the date it occurred on using either the Lowest(Close) or > LLV(Close, BarCount) function. > The two specific problems I am having is that; > > 1) the lowest value is not always the all time low but the low up > until the vertical line select is set if I have clicked somewhere on > the chart. If I move that line manually by clicking on the chart the > low changes, so it may be correct or it may not depending on the price > history. > > 2) I am using the ValueWhen function to give the date when the lowest > or LLV array is satisfied, however it seems to only produce the date > that the vertical line select is currently sitting at, even if the > lowest price is correct the date is always wrong unless I were to > manually click on that exact date that the low occurs on. > > So how can I separate the output of these functions from the select > chart vertical line so it gives me the all time lows/dates of the > entire chart (whether it is all visible or not) independent of where I > am clicking in the chart? Is this even possible? > > Below is my test code: (some alternative lines are commented out) > > Lowest_Close = Lowest(Close); > //Lowest_Close = LLV( Close, BarCount ); > //L_date = ValueWhen(LLV( Close, BarCount ), DateTime(),1); > L_date = ValueWhen(Lowest(Close), DateTime(), 1); > Lowest_date = NumToStr( L_date, formatDateTime); > Title = Name() + ": Total bars " + BarCount + " Low = " + Lowest_Close > + " on " + Lowest_date; > > Hopefully someone can point out what is wrong here......