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

Re: [Metastockusers] I need help for this formula...



PureBytes Links

Trading Reference Links

Hi,

Here is a formula (Tradestation code) and I would like to know if it is possible 
to translate into MS language.

Any help would be greatly appreciated,

Thanks in advance,


Karile


Here is the code (the default length is 20) :


Inputs: Len(Numeric);
Vars: Mean(0), j(0), k(1.253314), SumSqr(0), Scale(0), MaxY(0),
   MinY(0), Rng(0);
Arrays: X[100](0), Y[100](0);

Mean = Average((h+c+l)/3, Len);
SumSqr = 0;
for j = 0 to Len - 1 begin
   X[j] = C[j] - Mean;
   SumSqr = SumSqr + X[j] * X[j];
end;
Scale = SquareRoot(SumSqr / Len);
Y[0] = X[0];
MaxY = X[0];
MinY = X[0];
for j = 1 to Len - 1 begin
   Y[j] = Y[j - 1] + X[j];
   if Y[j] > MaxY then MaxY = Y[j];
   if Y[j] < MinY then MinY = Y[j];
end;
Rng = MaxY - MinY;
Genix = Log(Rng/(k * Scale)) / Log(Len);





>  
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
     Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/