Not sure about your questions but usually if I'm in doubt about whether 
something is working as I think it is, of if I'm interpreting the function or 
use of function correctly, I use the "old" Explore trick.  You'll see here that 
the lastvalue is indeed the last value of, in my case the slope of the end of 
day data in my database;  and b is equal to bv at the last element.   

Hope this helps

Joe L. 



  

P = ParamField("Price", -1);

b = LinRegSlope (p, 5);

bprime = LastValue(LinRegSlope(p,5)); 

bv = LastValue (b);

Filter =1; 

AddColumn(p,"Price");

AddColumn(b,"Slope"); 

AddColumn(bv,"LastValue of Slope");

AddColumn(bprime,"LastValue of Slope"); 

  ----- Original Message ----- 
  From: brysio4 
  To: [email protected] 
  Sent: Friday, May 23, 2008 1:59 AM
  Subject: [amibroker] Difference between values (newbe Q)


  Hi,

  I'm newbe in AFL. Sorry for "stupid" question.

  I have some lines of code:

  ....

  P = ParamField("Price", -1);
  b = LinRegSlope (p, 60);
  bv = LastValue (LinRegSlope (p, 60));

  ...

  I know that b is an array and bv is a numeric value. But why b <> bv?
  Even sometimes b > 0 and bv < 0 (or opposite).

  I check vslues with _TRACE function and DebugView.

  Regards,

  Piotr Rysak



   

Reply via email to