Nice work Bruce.

I was trying to make up my own algebraic equivalent in lieu of a reference 
source, or sources.


Did you get 'your' version of StDev from a reference of is it your own work?

--- In [email protected], "bruce1r" <bru...@...> wrote:
>
> Herman, Mike, all - just checking in and think I can offer a quick
> suggestion and some code that I have handy.
> 
> 1.  StDev() is a function that is not implemented as a variable period
> function, but can be with a slight caveat.  Because this uses an
> alternative, but algebraically equivalent formulation, that employs a
> "data^2" term, it loses precision at about the 5th significant digit. 
> That is close enough for most work, though.  So, anyway, this one liner
> function will give a fast, variable period StDev ( IOW, vper can be a
> varying array) -
> 
> function StDevVarPer( data, Vper )
> {
> return  sqrt( MA( data ^ 2, vper ) - MA( data, vper ) ^ 2 );
> }
> 
> 2.  This is fast even with large numbers of 1 minute bars, but it is
> usually best to control QuickAFL with a statement like the following as
> the LAST STATEMENT in the program to yield maximum performance -
> 
> SetBarsRequired( 500, 0 );
> 
> Remember that with QuickAFL in an indicator, the first execution after
> an edit or insert passes the entire array to set the bar requirement,
> then QuickAFL is in force on a subset.
> 
> -- BruceR
>


Reply via email to