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.

Reply via email to