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

Re: [Metastockusers] Can this formula be translated into MS language???



PureBytes Links

Trading Reference Links

Hi,

Isn't it possible to translate it into MS language ?

Thanks for your help,

Karile

karile wrote:

>Hi,
>
>Here is a Tradestation code and I would like to know if it is possible 
>to translate into MS language.
>
>Thanks for your help,
>
>Karile
>
>The code ( the default length must be set to 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 Links
>
>
>
> 
>
>
>  
>


 
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/