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

[amibroker] Re: An indicator tricky to code !!! (for AFL gurus)



PureBytes Links

Trading Reference Links

Calculating the Hurst Exponent
http://www.aci.net/kalliste/chaos7.htm

--- In amibroker@xxxxxxxxxxxxxxx, dan_public@xxxx wrote:
> Khamsina,
> 
> Rather than give us the code from another language, can you just
explain what it is supposed to do?  It's not obvious from the code.
> 
> Regards,
> 
> Dan.
> 
> -------------- Original message -------------- 
> 
> Hi,
> 
> I have been sweating on this indicator for 3 days (below, it's written 
> in EasyLanguage) and I just can't translate it into AFL :-( . 
> Unfortunately, it far more difficult for me (loop, array).
> 
> Many thanks in advance for your valuable help,
> Regards,
> 
> Khamsina
> 
> 
> 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;
> Estmtr = Log(Rng/(k * Scale)) / Log(Len);
> 
>       
> 
>       
>             
>
___________________________________________________________________________

> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
Messenger 
> Téléchargez cette version sur http://fr.messenger.yahoo.com 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>   
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

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

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

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