First thing that comes to mind is, make sure MnGain has no Null values
in the array... this will, in my experience, cause the LLV & HHV
functions to stop working... use Nz() to remove all Nulls...


--- In [email protected], "Ken Close" <[EMAIL PROTECTED]> wrote:
>
> I have the most basic statement using LLV but I get blank values in
the AA
> window.
>  
> I am checking for the max gain over a period and the minimum (or lowest)
> gain over the same period.
>  
> I have:
> AllDates       =  DateNum();
> 
> Price0         =  ValueWhen(Nmnth1,Price,1);
> 
> Price1         =  ValueWhen(Nmnth1,Price,2);
> 
> MnGain         =  100 * (Price0 - Price1)/Price1;
> 
> Per1           =  BarsSince(AllDates == StartDate);
> 
> MnGainH        =  HHV(MnGain,Per1);
> 
> MnGainL        =  LLV(MnGain,Per1);
> 
> AddColumn(MnGain,"MnGain",1.2);
> 
> AddColumn(MnGainH,"Highest MnGain",1.2,colorDefault,  Col,  120);
> 
> AddColumn(MnGainL,"Lowest MnGain",1.2,colorDefault,   Col,  120);
> 
>  
> 
> When I run this, I get proper results in the McGainH column and
blanks in
> the McGainL column.
> 
>  
> 
> What detail am I missing in this?
> 
>  
> 
> I have tried this line substituted,
> 
> MnGainL  =  IIf(MnGain<0,LLV(MnGain,Per1),LLV(MnGain,25));
> 
>  
> 
> And I get values where MnGain is > 0 and where the Period is a fixed 25
> instead of the Per1, and blank values where MnGain is < 0.
> 
>  
> 
> It seems that LLV does not like the Per1 value for the period but
the HHV
> function works OK with Per1 as the Period.  Why?
> 
>  
> 
> Must be basic but can someone educate me on this simple problem?
> 
>  
> 
> Thanks,
> 
> Ken
>


Reply via email to