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

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



PureBytes Links

Trading Reference Links

Easier to give a written explanation of what the indicator is trying to achieve.
I tried to convert it for something different to do, but came
uncertain with some items as to what direction it was actually going
and what trying to achieve in result
I could get the AFL without errors and results, but uncertainty to
what it does stopped me from posting.

On 6/14/05, Brian Fenske <brfenske@xxxxxxxxxxx> wrote:
> Khamsina,
>  
> I'm going to pick on you, but this is so common in most programming forums
> that I feel I need to finally say something:
>  
> It's time-consuming to convert an algorithm when someone uses variable names
> like Y, SumSqr, Scale, etc.  I don't feel like helping if every line I'm
> thinking "what is he trying to do!!??"
>  
> If you would like to get an answer more quickly (or at all!) please 
>  
> 1) describe what this thing is supposed to do, then 
>  
> 2) use variable names that clearly identify themselves, like
> CurrDayMaxPrice, TimeScale, BarCounter, etc.
>  
> If you don't know anything about how this works or what it does, then no one
> else will bother to figure it out either.  If on the other hand you give a
> description in clear language, then name your variables clearly (and maybe,
> heaven forbid, include comments in your code!) then I'm sure someone will
> jump to help you out.
>  
> Thanks.  Just had to get that off my chest.
> Brian
> 
> ----- Original Message ----- 
> From: Khamsina11 
> To: amibroker@xxxxxxxxxxxxxxx 
> Sent: Monday, June 13, 2005 3:54 PM
> Subject: [amibroker] An indicator tricky to code !!! (for AFL gurus)
> 
> 
> 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
> 
> 
> 
> 
> 
> 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. 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/