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

[amibroker] Re: How to code a Adaptive StDev()



PureBytes Links

Trading Reference Links

I am following this discussion because I think it is an example of reworking some a math algorithm, or industry wide indicator, into an AFL friendly format.

I have been mulling over this point since RZ raised the issue of the Median() function and NumericalRecipes came into the discussion on coding maths formulas for AB.

My thinking is stimulated further by Tomasz's comment yesterday that AFL internally uses pointers, automatically allocates memory and auto creates array references....something that C does but that the C programmer had to take care of themselves.


It's a real pity that Tomasz hasn't included a chapter in the manual that explains the context in which we use AB.
I find this info extremely helpful to enhance my understanding of AFl and the only way I can find anything out is to wait until Tomasz posts a one line reply in this forum.... I have been collecting them, for a year now, and so far I have around 7 lines!

BruceR's posts in this area are very instructive (you are a born teacher Bruce).

Based on the snippets of info that I have about AFL execution I am now wondering:

- how does C or C++ compare to AFL for speed (in a flat out footrace)

Since all or most of the math functions we would ever need have been (arguably) optimised via the versions that exist in libraries would we be better off just putting, say, the C NumericalRecipes version, into a DLL.

If it is good enough for Tomasz to write the functions in C++ then it must be good enough for us.

Take StDev for example - I assume the AB version is written in C++ so I am now curious if an equivalent, written entirely in AFL, would beat Tomasz's version in a foot race.

BruceR says that Tomasz has optimised all of the AFL functions so I guess it is an academic excercise, but an interesing one.

Another question is:

- if I do write a plugin for a maths function, in C++, is there a time penalty for accessing the code from the plugin?

On your subject of adaptiveStDev:

I have a half-formed idea, on the board ... it seems to be heading for a pseudocode solution but so far I have only considered it in the context of a trade series i.e. I am trying to work out an array processing method to find the StDev of a trade series, without looping back.

I am not sure when I will finish, and if it will extend to data series other than trades, at this stage,  but if it works out I will post it somewhere in the future.



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/